Tutorial: GMOS Imaging Reduction - NGC 3310 - g-band

Datasets:

Science observation UT date(s) 2015 Dec 14
Data filename prefix(es) N20151214S

Target Frames

ScienceN20151214S247-250binning 2x2
Processed Biasfor 20151214N20151214S0346_bias.fits
Processed Twilight Flatfor 20151214N20151205S0423_flat_g.fits
Processed Fringe FrameN/AN/A

Fringe Frames

N/A

Twilight Flats

Processed: N20151205S0423_flat_g.fits
Twilight FramesN20151205S423-434binning 2x2
Processed Biasfor 20151205N20151205S0525_bias.fits

Biases

Processed: N20151214S0346_bias.fits
BiasesN20151214S346-350binning 2x2
Processed: N20151205S0525_bias.fits
BiasesN20151205S525-529binning 2x2

STEP 0: Directory structure used by this Notebook

The directory paths used in this notebook are assumed to match this structure:

rootdir/
    calib/
        bias/
        flat/
        fringe/
    raw/
    redux/

STEP 1: Set up the Notebook and the PyRAF session

The data processing will happen in the Notebook. It is also convenient to have a PyRAF interactive session ready to use if needed, eg. to imexam. In this step, we will configure the Notebook and the PyRAF session.

This step needs to be repeated everytime the Notebook and/or the PyRAF session is restarted.

STEP 1.1: Set up the Notebook

STEP 1.1.1: Set up the variables.


In [6]:
import os
import os.path
import shutil

# WARNING: Make sure that the directory structure given in Step 0 
#          is already in place.

# EDIT HERE - Directories
rootdir = '/data/workspace/DRWorkshopAAO/NGC3310'

# EDIT HERE - File numbers and file names
biases = {
    'bias_20151214' : {
        'procbias' : 'N20151214S0346_bias.fits',
        'frames'   : [('N20151214S', '346-350')
                     ]
    },
    'bias_20151205' : {
        'procbias' : 'N20151205S0525_bias.fits',
        'frames'   : [('N20151205S', '525-529')
                     ]
    },

}

flats = {
    'flat_20151205' : {
        'procflat'   : 'N20151205S0018_flat_g.fits',
        'frames'     : [('N20151205S', '423-434')],
        'flatbias'   : biases['bias_20151205']['procbias'],
    }
}

science = {
    'procsci'   : 'ngc3310_g.fits',
    'sciroot'   : 'N20151214S',
    'sciframes' : '247-250',
    'scibias'   : biases['bias_20151214']['procbias'],
    'sciflat'   : flats['flat_20151205']['procflat'],
    #'scifringe' : fringes['fringe_20101111']['procfringe'],
}

logfile = 'NGC3310_g.log'

# Automatically set directories to match structure from Step 0
raw_path = os.path.join(rootdir, 'raw') + '/'
redux_path = os.path.join(rootdir, 'redux') + '/'
procbias_path = os.path.join(rootdir, 'calib', 'bias') + '/'
procflat_path = os.path.join(rootdir, 'calib', 'flat') + '/'
procfringe_path = os.path.join(rootdir, 'calib', 'fringe') + '/'
products_path = os.path.join(rootdir, 'products') + '/'

# Change to work directory
os.chdir(redux_path)

Step 1.1.2: Load and initialize the package

---> LAUNCH DS9 before proceeding further

Load the package required for the Notebook session and reset tasks to the default parameters.


In [3]:
from pyraf import iraf
iraf.gemini()
iraf.gmos()

iraf.unlearn(iraf.gemini, iraf.gmos, iraf.gemtools)

iraf.gmos.logfile = logfile

iraf.set(stdimage='imtgmos')


This is the initial release of the IRAF FITSUTIL package
to include support for FITS tile compression via 'fpack'.
Please send comments and questions to seaman@noao.edu.

 
     +------------------- Gemini IRAF Package -------------------+
     |             Version 1.13.1, December 7, 2015              |
     |             Requires IRAF v2.14.1 or greater              |
     |              Tested with Ureka IRAF v2.16                 |
     |             Gemini Observatory, Hilo, Hawaii              |
     |    Please use the help desk for submission of questions   |
     |  http://www.gemini.edu/sciops/helpdesk/helpdeskIndex.html |
     +-----------------------------------------------------------+
 
     Warning setting imtype=fits
     Warning setting use_new_imt=no
 
gemini/:
 f2/            gemtools/       gsaoi/          niri/
 flamingos/     gmos/           midir/          oscir/
 gemlocal/      gnirs/          nifs/           quirc/
gmos/:
 gbias          gfquick         gmosaic         gsappwave       gssdist
 gbpm           gfreduce        gmosexamples    gscalibrate     gsskysub
 gdark          gfresponse      gmosinfo        gscrmask        gsslitfunction
 gdisplay       gfscatsub       gmosinfoifu     gscrrej         gsstandard
 gfapsum        gfskysub        gmosinfoimag    gscut           gstransform
 gfcombine      gftransform     gmosinfospec    gsdrawslits     gswavelength
 gfcopy         giflat          gnscombine      gsextract       mostools/
 gfcube         gifringe        gnsdark         gsflat
 gfdisplay      giillum         gnsskysub       gsfquick
 gfextract      gireduce        gprepare        gsreduce
 gffindblocks   girmfringe      gqecorr         gsscatsub

STEP 1.2: Set up the PyRAF session

The commands shown here need to be run from the shell.

Open an xterm or a Terminal, then:

cd /data/workspace/DRWorkshopAAO/NGC3310/redux
pyraf

Then in the PyRAF session:

gemini
gmos
unlearn gemini
unlearn gmos
unlearn gemtools

Get your PyRAF configured. In the PyRAF session:

iraf.gmos.logfile = "NGC3310_g.log"
set stdimage=imtgmos

STEP 2: Create the file lists


In [7]:
os.chdir(redux_path)

# delete any pre-existing lists
iraf.delete('*.lis', verify='no')

# biases
for (root, frames) in biases['bias_20151214']['frames']:
    iraf.gemlist(root, frames, Stdout='tmp_'+root+'.lis')
iraf.concat('tmp_*.lis', 'bias_20151214.lis')
iraf.delete('tmp_*.lis', verify='no')

for (root, frames) in biases['bias_20151205']['frames']:
    iraf.gemlist(root, frames, Stdout='tmp_'+root+'.lis')
iraf.concat('tmp_*.lis', 'bias_20151205.lis')
iraf.delete('tmp_*.lis', verify='no')


# flats
for (root, frames) in flats['flat_20151205']['frames']:
    iraf.gemlist(root, frames, Stdout='tmp_'+root+'.lis')
iraf.concat('tmp_*.lis', 'flat_20151205.lis')
iraf.delete('tmp_*.lis', verify='no')


# science
iraf.gemlist(science['sciroot'], science['sciframes'], \
             Stdout='sci.lis')

# Get a full list
iraf.concat('*.lis', 'all.lis')

STEP 3: Visually inspect all the data


In [8]:
all_files = open('all.lis', 'r')
for line in all_files:
    image = line.strip() + '[1]'
    print image
    iraf.gdisplay(raw_path + image, 1, fl_paste='no')
    iraf.sleep(5)
    
all_files.close()


N20151205S0525[1]

GDISPLAY - Started: 2016-04-09T11:35:01

GDISPLAY: Temporary image name tmpout4362_53N20151205S0525.fits

GMULTIAMP - Started: 2016-04-09T11:35:02


GMULTIAMP - Finished: 2016-04-09T11:35:03
GMULTIAMP - Exit status: GOOD

GDISPLAY: Displaying image...

GDISPLAY - Finished: 2016-04-09T11:35:05

N20151205S0526[1]

GDISPLAY - Started: 2016-04-09T11:35:10

GDISPLAY: Temporary image name tmpout4362_74N20151205S0526.fits

GMULTIAMP - Started: 2016-04-09T11:35:10


GMULTIAMP - Finished: 2016-04-09T11:35:11
GMULTIAMP - Exit status: GOOD

GDISPLAY: Displaying image...

GDISPLAY - Finished: 2016-04-09T11:35:13

N20151205S0527[1]

GDISPLAY - Started: 2016-04-09T11:35:18

GDISPLAY: Temporary image name tmpout4362_95N20151205S0527.fits

GMULTIAMP - Started: 2016-04-09T11:35:18


GMULTIAMP - Finished: 2016-04-09T11:35:19
GMULTIAMP - Exit status: GOOD

GDISPLAY: Displaying image...

GDISPLAY - Finished: 2016-04-09T11:35:21

N20151205S0528[1]

GDISPLAY - Started: 2016-04-09T11:35:26

GDISPLAY: Temporary image name tmpout4362_116N20151205S0528.fits

GMULTIAMP - Started: 2016-04-09T11:35:26


GMULTIAMP - Finished: 2016-04-09T11:35:27
GMULTIAMP - Exit status: GOOD

GDISPLAY: Displaying image...

GDISPLAY - Finished: 2016-04-09T11:35:29

N20151205S0529[1]

GDISPLAY - Started: 2016-04-09T11:35:34

GDISPLAY: Temporary image name tmpout4362_137N20151205S0529.fits

GMULTIAMP - Started: 2016-04-09T11:35:35


GMULTIAMP - Finished: 2016-04-09T11:35:36
GMULTIAMP - Exit status: GOOD

GDISPLAY: Displaying image...

GDISPLAY - Finished: 2016-04-09T11:35:38

N20151214S0346[1]

GDISPLAY - Started: 2016-04-09T11:35:43

GDISPLAY: Temporary image name tmpout4362_158N20151214S0346.fits

GMULTIAMP - Started: 2016-04-09T11:35:43


GMULTIAMP - Finished: 2016-04-09T11:35:44
GMULTIAMP - Exit status: GOOD

GDISPLAY: Displaying image...

GDISPLAY - Finished: 2016-04-09T11:35:46

N20151214S0347[1]

GDISPLAY - Started: 2016-04-09T11:35:51

GDISPLAY: Temporary image name tmpout4362_179N20151214S0347.fits

GMULTIAMP - Started: 2016-04-09T11:35:51


GMULTIAMP - Finished: 2016-04-09T11:35:52
GMULTIAMP - Exit status: GOOD

GDISPLAY: Displaying image...

GDISPLAY - Finished: 2016-04-09T11:35:54

N20151214S0348[1]

GDISPLAY - Started: 2016-04-09T11:35:59

GDISPLAY: Temporary image name tmpout4362_200N20151214S0348.fits

GMULTIAMP - Started: 2016-04-09T11:35:59


GMULTIAMP - Finished: 2016-04-09T11:36:00
GMULTIAMP - Exit status: GOOD

GDISPLAY: Displaying image...

GDISPLAY - Finished: 2016-04-09T11:36:02

N20151214S0349[1]

GDISPLAY - Started: 2016-04-09T11:36:07

GDISPLAY: Temporary image name tmpout4362_221N20151214S0349.fits

GMULTIAMP - Started: 2016-04-09T11:36:07


GMULTIAMP - Finished: 2016-04-09T11:36:08
GMULTIAMP - Exit status: GOOD

GDISPLAY: Displaying image...

GDISPLAY - Finished: 2016-04-09T11:36:10

N20151214S0350[1]

GDISPLAY - Started: 2016-04-09T11:36:15

GDISPLAY: Temporary image name tmpout4362_242N20151214S0350.fits

GMULTIAMP - Started: 2016-04-09T11:36:15


GMULTIAMP - Finished: 2016-04-09T11:36:16
GMULTIAMP - Exit status: GOOD

GDISPLAY: Displaying image...

GDISPLAY - Finished: 2016-04-09T11:36:18

N20151205S0423[1]

GDISPLAY - Started: 2016-04-09T11:36:23

GDISPLAY: Temporary image name tmpout4362_263N20151205S0423.fits

GMULTIAMP - Started: 2016-04-09T11:36:24


GMULTIAMP - Finished: 2016-04-09T11:36:25
GMULTIAMP - Exit status: GOOD

GDISPLAY: Displaying image...

GDISPLAY - Finished: 2016-04-09T11:36:27

N20151205S0424[1]

GDISPLAY - Started: 2016-04-09T11:36:32

GDISPLAY: Temporary image name tmpout4362_284N20151205S0424.fits

GMULTIAMP - Started: 2016-04-09T11:36:32


GMULTIAMP - Finished: 2016-04-09T11:36:33
GMULTIAMP - Exit status: GOOD

GDISPLAY: Displaying image...

GDISPLAY - Finished: 2016-04-09T11:36:35

N20151205S0425[1]

GDISPLAY - Started: 2016-04-09T11:36:40

GDISPLAY: Temporary image name tmpout4362_305N20151205S0425.fits

GMULTIAMP - Started: 2016-04-09T11:36:40


GMULTIAMP - Finished: 2016-04-09T11:36:41
GMULTIAMP - Exit status: GOOD

GDISPLAY: Displaying image...

GDISPLAY - Finished: 2016-04-09T11:36:43

N20151205S0426[1]

GDISPLAY - Started: 2016-04-09T11:36:48

GDISPLAY: Temporary image name tmpout4362_326N20151205S0426.fits

GMULTIAMP - Started: 2016-04-09T11:36:48


GMULTIAMP - Finished: 2016-04-09T11:36:49
GMULTIAMP - Exit status: GOOD

GDISPLAY: Displaying image...

GDISPLAY - Finished: 2016-04-09T11:36:51

N20151205S0427[1]

GDISPLAY - Started: 2016-04-09T11:36:56

GDISPLAY: Temporary image name tmpout4362_347N20151205S0427.fits

GMULTIAMP - Started: 2016-04-09T11:36:56


GMULTIAMP - Finished: 2016-04-09T11:36:57
GMULTIAMP - Exit status: GOOD

GDISPLAY: Displaying image...

GDISPLAY - Finished: 2016-04-09T11:36:59

N20151205S0428[1]

GDISPLAY - Started: 2016-04-09T11:37:04

GDISPLAY: Temporary image name tmpout4362_368N20151205S0428.fits

GMULTIAMP - Started: 2016-04-09T11:37:04


GMULTIAMP - Finished: 2016-04-09T11:37:05
GMULTIAMP - Exit status: GOOD

GDISPLAY: Displaying image...

GDISPLAY - Finished: 2016-04-09T11:37:07

N20151205S0429[1]

GDISPLAY - Started: 2016-04-09T11:37:12

GDISPLAY: Temporary image name tmpout4362_389N20151205S0429.fits

GMULTIAMP - Started: 2016-04-09T11:37:12


GMULTIAMP - Finished: 2016-04-09T11:37:13
GMULTIAMP - Exit status: GOOD

GDISPLAY: Displaying image...

GDISPLAY - Finished: 2016-04-09T11:37:15

N20151205S0430[1]

GDISPLAY - Started: 2016-04-09T11:37:20

GDISPLAY: Temporary image name tmpout4362_410N20151205S0430.fits

GMULTIAMP - Started: 2016-04-09T11:37:21


GMULTIAMP - Finished: 2016-04-09T11:37:22
GMULTIAMP - Exit status: GOOD

GDISPLAY: Displaying image...

GDISPLAY - Finished: 2016-04-09T11:37:24

N20151205S0431[1]

GDISPLAY - Started: 2016-04-09T11:37:29

GDISPLAY: Temporary image name tmpout4362_431N20151205S0431.fits

GMULTIAMP - Started: 2016-04-09T11:37:29


GMULTIAMP - Finished: 2016-04-09T11:37:30
GMULTIAMP - Exit status: GOOD

GDISPLAY: Displaying image...

GDISPLAY - Finished: 2016-04-09T11:37:32

N20151205S0432[1]

GDISPLAY - Started: 2016-04-09T11:37:37

GDISPLAY: Temporary image name tmpout4362_452N20151205S0432.fits

GMULTIAMP - Started: 2016-04-09T11:37:37


GMULTIAMP - Finished: 2016-04-09T11:37:38
GMULTIAMP - Exit status: GOOD

GDISPLAY: Displaying image...

GDISPLAY - Finished: 2016-04-09T11:37:40

N20151205S0433[1]

GDISPLAY - Started: 2016-04-09T11:37:45

GDISPLAY: Temporary image name tmpout4362_473N20151205S0433.fits

GMULTIAMP - Started: 2016-04-09T11:37:45


GMULTIAMP - Finished: 2016-04-09T11:37:46
GMULTIAMP - Exit status: GOOD

GDISPLAY: Displaying image...

GDISPLAY - Finished: 2016-04-09T11:37:48

N20151205S0434[1]

GDISPLAY - Started: 2016-04-09T11:37:53

GDISPLAY: Temporary image name tmpout4362_494N20151205S0434.fits

GMULTIAMP - Started: 2016-04-09T11:37:53


GMULTIAMP - Finished: 2016-04-09T11:37:54
GMULTIAMP - Exit status: GOOD

GDISPLAY: Displaying image...

GDISPLAY - Finished: 2016-04-09T11:37:56

N20151214S0247[1]

GDISPLAY - Started: 2016-04-09T11:38:01

GDISPLAY: Temporary image name tmpout4362_515N20151214S0247.fits

GMULTIAMP - Started: 2016-04-09T11:38:01


GMULTIAMP - Finished: 2016-04-09T11:38:02
GMULTIAMP - Exit status: GOOD

GDISPLAY: Displaying image...

GDISPLAY - Finished: 2016-04-09T11:38:04

N20151214S0248[1]

GDISPLAY - Started: 2016-04-09T11:38:09

GDISPLAY: Temporary image name tmpout4362_536N20151214S0248.fits

GMULTIAMP - Started: 2016-04-09T11:38:10


GMULTIAMP - Finished: 2016-04-09T11:38:11
GMULTIAMP - Exit status: GOOD

GDISPLAY: Displaying image...

GDISPLAY - Finished: 2016-04-09T11:38:13

N20151214S0249[1]

GDISPLAY - Started: 2016-04-09T11:38:18

GDISPLAY: Temporary image name tmpout4362_557N20151214S0249.fits

GMULTIAMP - Started: 2016-04-09T11:38:18


GMULTIAMP - Finished: 2016-04-09T11:38:19
GMULTIAMP - Exit status: GOOD

GDISPLAY: Displaying image...

GDISPLAY - Finished: 2016-04-09T11:38:21

N20151214S0250[1]

GDISPLAY - Started: 2016-04-09T11:38:26

GDISPLAY: Temporary image name tmpout4362_578N20151214S0250.fits

GMULTIAMP - Started: 2016-04-09T11:38:26


GMULTIAMP - Finished: 2016-04-09T11:38:27
GMULTIAMP - Exit status: GOOD

GDISPLAY: Displaying image...

GDISPLAY - Finished: 2016-04-09T11:38:29

STEP 4: Process the biases

This will produce the bias defined above. That bias will be used later to process the science frames, and the twilight flats.


In [9]:
os.chdir(redux_path)

for biaskey in biases.keys():
    iraf.imdelete(biases[biaskey]['procbias'], verify='no')
    iraf.imdelete('g//@'+biaskey+'.lis', verify='no')

    print 'Creating bias ', biases[biaskey]['procbias']
    iraf.gbias('@'+biaskey+'.lis', outbias=biases[biaskey]['procbias'], \
               rawpath=raw_path, fl_over='yes', fl_trim='yes', \
               fl_vardq='yes')
    shutil.copy(biases[biaskey]['procbias'], procbias_path)

# The processed biases are:
os.listdir(procbias_path)


Creating bias  N20151214S0346_bias.fits
----------------------------------------------------------------------------
GBIAS -- Sat Apr  9 11:38:52 HST 2016

Input images:
  N20151214S0346
  N20151214S0347
  N20151214S0348
  N20151214S0349
  N20151214S0350

Output bias image: N20151214S0346_bias.fits
 

----------------------------------------------------------------------------
GIREDUCE -- Sat Apr  9 11:38:53 HST 2016

----------------------------------------------------------------------------
GPREPARE -- Sat Apr  9 11:38:53 HST 2016

Input list    = /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151214S0346
Output list   = 
Output prefix = g
Raw path      = 
MDF dir       = gmos$data/
Add MDF       = no

Input  /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151214S0346.fits   Output  gN20151214S0346.fits

GPREPARE exit status: good.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
GPREPARE -- Sat Apr  9 11:38:54 HST 2016

Input list    = /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151214S0347
Output list   = 
Output prefix = g
Raw path      = 
MDF dir       = gmos$data/
Add MDF       = no

Input  /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151214S0347.fits   Output  gN20151214S0347.fits

GPREPARE exit status: good.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
GPREPARE -- Sat Apr  9 11:38:55 HST 2016

Input list    = /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151214S0348
Output list   = 
Output prefix = g
Raw path      = 
MDF dir       = gmos$data/
Add MDF       = no

Input  /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151214S0348.fits   Output  gN20151214S0348.fits

GPREPARE exit status: good.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
GPREPARE -- Sat Apr  9 11:38:57 HST 2016

Input list    = /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151214S0349
Output list   = 
Output prefix = g
Raw path      = 
MDF dir       = gmos$data/
Add MDF       = no

Input  /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151214S0349.fits   Output  gN20151214S0349.fits

GPREPARE exit status: good.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
GPREPARE -- Sat Apr  9 11:38:58 HST 2016

Input list    = /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151214S0350
Output list   = 
Output prefix = g
Raw path      = 
MDF dir       = gmos$data/
Add MDF       = no

Input  /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151214S0350.fits   Output  gN20151214S0350.fits

GPREPARE exit status: good.
----------------------------------------------------------------------------

Input files:
gN20151214S0346
gN20151214S0347
gN20151214S0348
gN20151214S0349
gN20151214S0350

Output files:
tmpfile4362_604N20151214S0346
tmpfile4362_604N20151214S0347
tmpfile4362_604N20151214S0348
tmpfile4362_604N20151214S0349
tmpfile4362_604N20151214S0350

GIREDUCE: Image tmpfile4362_604N20151214S0346 overscan subtracted
GIREDUCE: Image tmpfile4362_604N20151214S0347 overscan subtracted
GIREDUCE: Image tmpfile4362_604N20151214S0348 overscan subtracted
GIREDUCE: Image tmpfile4362_604N20151214S0349 overscan subtracted
GIREDUCE: Image tmpfile4362_604N20151214S0350 overscan subtracted
GIREDUCE: Image tmpfile4362_604N20151214S0346 trimmed
GIREDUCE: Image tmpfile4362_604N20151214S0347 trimmed
GIREDUCE: Image tmpfile4362_604N20151214S0348 trimmed
GIREDUCE: Image tmpfile4362_604N20151214S0349 trimmed
GIREDUCE: Image tmpfile4362_604N20151214S0350 trimmed


GIREDUCE - Cleaning up -- Sat Apr  9 11:39:47 HST 2016

GIREDUCE -- Sat Apr  9 11:39:47 HST 2016
GIREDUCE exit status:  good.
----------------------------------------------------------------------------
--------------------------------------------------------------------------------
GEMCOMBINE -- Sat Apr  9 11:39:47 HST 2016
 
GEMCOMBINE: input = @tmpcombin4362_601
GEMCOMBINE: output = N20151214S0346_bias.fits
GEMCOMBINE: title = Bias
GEMCOMBINE: bpmfile = 
GEMCOMBINE: sci_ext = SCI
GEMCOMBINE: var_ext = VAR
GEMCOMBINE: dq_ext = DQ
 
WARNING - GEMCOMBINE: five or less images to combine.

Apr  9 11:39: IMCOMBINE
  combine = average, scale = none, zero = none, weight = none
  reject = avsigclip, mclip = yes, nkeep = 1
  lsigma = 3., hsigma = 3.
  blank = 0.
  statsec = Apr  9 11:39
                Images     Exp
  tmpfile4362_604N20151214S0346.fits[SCI,1]    0.0
  tmpfile4362_604N20151214S0347.fits[SCI,1]    0.0
  tmpfile4362_604N20151214S0348.fits[SCI,1]    0.0
  tmpfile4362_604N20151214S0349.fits[SCI,1]    0.0
  tmpfile4362_604N20151214S0350.fits[SCI,1]    0.0

  Output image = tmpcombout4362_669, ncombine = 5
  Number rejected mask = tmpcombdq4362_670.pl
  Sigma image = tmpcombsig4362_671
WARNING - GEMCOMBINE: five or less images to combine.

Apr  9 11:39: IMCOMBINE
  combine = average, scale = none, zero = none, weight = none
  reject = avsigclip, mclip = yes, nkeep = 1
  lsigma = 3., hsigma = 3.
  blank = 0.
  statsec = Apr  9 11:39
                Images     Exp
  tmpfile4362_604N20151214S0346.fits[SCI,2]    0.0
  tmpfile4362_604N20151214S0347.fits[SCI,2]    0.0
  tmpfile4362_604N20151214S0348.fits[SCI,2]    0.0
  tmpfile4362_604N20151214S0349.fits[SCI,2]    0.0
  tmpfile4362_604N20151214S0350.fits[SCI,2]    0.0

  Output image = tmpcombout4362_676, ncombine = 5
  Number rejected mask = tmpcombdq4362_677.pl
  Sigma image = tmpcombsig4362_678
WARNING - GEMCOMBINE: five or less images to combine.

Apr  9 11:39: IMCOMBINE
  combine = average, scale = none, zero = none, weight = none
  reject = avsigclip, mclip = yes, nkeep = 1
  lsigma = 3., hsigma = 3.
  blank = 0.
  statsec = Apr  9 11:39
                Images     Exp
  tmpfile4362_604N20151214S0346.fits[SCI,3]    0.0
  tmpfile4362_604N20151214S0347.fits[SCI,3]    0.0
  tmpfile4362_604N20151214S0348.fits[SCI,3]    0.0
  tmpfile4362_604N20151214S0349.fits[SCI,3]    0.0
  tmpfile4362_604N20151214S0350.fits[SCI,3]    0.0

  Output image = tmpcombout4362_680, ncombine = 5
  Number rejected mask = tmpcombdq4362_681.pl
  Sigma image = tmpcombsig4362_682
WARNING - GEMCOMBINE: five or less images to combine.

Apr  9 11:39: IMCOMBINE
  combine = average, scale = none, zero = none, weight = none
  reject = avsigclip, mclip = yes, nkeep = 1
  lsigma = 3., hsigma = 3.
  blank = 0.
  statsec = Apr  9 11:39
                Images     Exp
  tmpfile4362_604N20151214S0346.fits[SCI,4]    0.0
  tmpfile4362_604N20151214S0347.fits[SCI,4]    0.0
  tmpfile4362_604N20151214S0348.fits[SCI,4]    0.0
  tmpfile4362_604N20151214S0349.fits[SCI,4]    0.0
  tmpfile4362_604N20151214S0350.fits[SCI,4]    0.0

  Output image = tmpcombout4362_684, ncombine = 5
  Number rejected mask = tmpcombdq4362_685.pl
  Sigma image = tmpcombsig4362_686
WARNING - GEMCOMBINE: five or less images to combine.

Apr  9 11:39: IMCOMBINE
  combine = average, scale = none, zero = none, weight = none
  reject = avsigclip, mclip = yes, nkeep = 1
  lsigma = 3., hsigma = 3.
  blank = 0.
  statsec = Apr  9 11:39
                Images     Exp
  tmpfile4362_604N20151214S0346.fits[SCI,5]    0.0
  tmpfile4362_604N20151214S0347.fits[SCI,5]    0.0
  tmpfile4362_604N20151214S0348.fits[SCI,5]    0.0
  tmpfile4362_604N20151214S0349.fits[SCI,5]    0.0
  tmpfile4362_604N20151214S0350.fits[SCI,5]    0.0

  Output image = tmpcombout4362_688, ncombine = 5
  Number rejected mask = tmpcombdq4362_689.pl
  Sigma image = tmpcombsig4362_690
WARNING - GEMCOMBINE: five or less images to combine.

Apr  9 11:39: IMCOMBINE
  combine = average, scale = none, zero = none, weight = none
  reject = avsigclip, mclip = yes, nkeep = 1
  lsigma = 3., hsigma = 3.
  blank = 0.
  statsec = Apr  9 11:39
                Images     Exp
  tmpfile4362_604N20151214S0346.fits[SCI,6]    0.0
  tmpfile4362_604N20151214S0347.fits[SCI,6]    0.0
  tmpfile4362_604N20151214S0348.fits[SCI,6]    0.0
  tmpfile4362_604N20151214S0349.fits[SCI,6]    0.0
  tmpfile4362_604N20151214S0350.fits[SCI,6]    0.0

  Output image = tmpcombout4362_692, ncombine = 5
  Number rejected mask = tmpcombdq4362_693.pl
  Sigma image = tmpcombsig4362_694
 
GEMCOMBINE -- Finished: Sat Apr  9 11:39:59 HST 2016
 
GEMCOMBINE -- Exit status: GOOD
--------------------------------------------------------------------------------

GBIAS: Exit status: GOOD.
----------------------------------------------------------------------------
Creating bias  N20151205S0525_bias.fits
----------------------------------------------------------------------------
GBIAS -- Sat Apr  9 11:39:59 HST 2016

Input images:
  N20151205S0525
  N20151205S0526
  N20151205S0527
  N20151205S0528
  N20151205S0529

Output bias image: N20151205S0525_bias.fits
 

----------------------------------------------------------------------------
GIREDUCE -- Sat Apr  9 11:40:00 HST 2016

----------------------------------------------------------------------------
GPREPARE -- Sat Apr  9 11:40:00 HST 2016

Input list    = /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151205S0525
Output list   = 
Output prefix = g
Raw path      = 
MDF dir       = gmos$data/
Add MDF       = no

Input  /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151205S0525.fits   Output  gN20151205S0525.fits

GPREPARE exit status: good.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
GPREPARE -- Sat Apr  9 11:40:01 HST 2016

Input list    = /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151205S0526
Output list   = 
Output prefix = g
Raw path      = 
MDF dir       = gmos$data/
Add MDF       = no

Input  /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151205S0526.fits   Output  gN20151205S0526.fits

GPREPARE exit status: good.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
GPREPARE -- Sat Apr  9 11:40:02 HST 2016

Input list    = /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151205S0527
Output list   = 
Output prefix = g
Raw path      = 
MDF dir       = gmos$data/
Add MDF       = no

Input  /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151205S0527.fits   Output  gN20151205S0527.fits

GPREPARE exit status: good.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
GPREPARE -- Sat Apr  9 11:40:04 HST 2016

Input list    = /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151205S0528
Output list   = 
Output prefix = g
Raw path      = 
MDF dir       = gmos$data/
Add MDF       = no

Input  /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151205S0528.fits   Output  gN20151205S0528.fits

GPREPARE exit status: good.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
GPREPARE -- Sat Apr  9 11:40:05 HST 2016

Input list    = /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151205S0529
Output list   = 
Output prefix = g
Raw path      = 
MDF dir       = gmos$data/
Add MDF       = no

Input  /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151205S0529.fits   Output  gN20151205S0529.fits

GPREPARE exit status: good.
----------------------------------------------------------------------------

Input files:
gN20151205S0525
gN20151205S0526
gN20151205S0527
gN20151205S0528
gN20151205S0529

Output files:
tmpfile4362_702N20151205S0525
tmpfile4362_702N20151205S0526
tmpfile4362_702N20151205S0527
tmpfile4362_702N20151205S0528
tmpfile4362_702N20151205S0529

GIREDUCE: Image tmpfile4362_702N20151205S0525 overscan subtracted
GIREDUCE: Image tmpfile4362_702N20151205S0526 overscan subtracted
GIREDUCE: Image tmpfile4362_702N20151205S0527 overscan subtracted
GIREDUCE: Image tmpfile4362_702N20151205S0528 overscan subtracted
GIREDUCE: Image tmpfile4362_702N20151205S0529 overscan subtracted
GIREDUCE: Image tmpfile4362_702N20151205S0525 trimmed
GIREDUCE: Image tmpfile4362_702N20151205S0526 trimmed
GIREDUCE: Image tmpfile4362_702N20151205S0527 trimmed
GIREDUCE: Image tmpfile4362_702N20151205S0528 trimmed
GIREDUCE: Image tmpfile4362_702N20151205S0529 trimmed


GIREDUCE - Cleaning up -- Sat Apr  9 11:40:54 HST 2016

GIREDUCE -- Sat Apr  9 11:40:54 HST 2016
GIREDUCE exit status:  good.
----------------------------------------------------------------------------
--------------------------------------------------------------------------------
GEMCOMBINE -- Sat Apr  9 11:40:54 HST 2016
 
GEMCOMBINE: input = @tmpcombin4362_699
GEMCOMBINE: output = N20151205S0525_bias.fits
GEMCOMBINE: title = Bias
GEMCOMBINE: bpmfile = 
GEMCOMBINE: sci_ext = SCI
GEMCOMBINE: var_ext = VAR
GEMCOMBINE: dq_ext = DQ
 
WARNING - GEMCOMBINE: five or less images to combine.

Apr  9 11:40: IMCOMBINE
  combine = average, scale = none, zero = none, weight = none
  reject = avsigclip, mclip = yes, nkeep = 1
  lsigma = 3., hsigma = 3.
  blank = 0.
  statsec = Apr  9 11:40
                Images     Exp
  tmpfile4362_702N20151205S0525.fits[SCI,1]    0.0
  tmpfile4362_702N20151205S0526.fits[SCI,1]    0.0
  tmpfile4362_702N20151205S0527.fits[SCI,1]    0.0
  tmpfile4362_702N20151205S0528.fits[SCI,1]    0.0
  tmpfile4362_702N20151205S0529.fits[SCI,1]    0.0

  Output image = tmpcombout4362_767, ncombine = 5
  Number rejected mask = tmpcombdq4362_768.pl
  Sigma image = tmpcombsig4362_769
WARNING - GEMCOMBINE: five or less images to combine.

Apr  9 11:40: IMCOMBINE
  combine = average, scale = none, zero = none, weight = none
  reject = avsigclip, mclip = yes, nkeep = 1
  lsigma = 3., hsigma = 3.
  blank = 0.
  statsec = Apr  9 11:40
                Images     Exp
  tmpfile4362_702N20151205S0525.fits[SCI,2]    0.0
  tmpfile4362_702N20151205S0526.fits[SCI,2]    0.0
  tmpfile4362_702N20151205S0527.fits[SCI,2]    0.0
  tmpfile4362_702N20151205S0528.fits[SCI,2]    0.0
  tmpfile4362_702N20151205S0529.fits[SCI,2]    0.0

  Output image = tmpcombout4362_774, ncombine = 5
  Number rejected mask = tmpcombdq4362_775.pl
  Sigma image = tmpcombsig4362_776
WARNING - GEMCOMBINE: five or less images to combine.

Apr  9 11:40: IMCOMBINE
  combine = average, scale = none, zero = none, weight = none
  reject = avsigclip, mclip = yes, nkeep = 1
  lsigma = 3., hsigma = 3.
  blank = 0.
  statsec = Apr  9 11:40
                Images     Exp
  tmpfile4362_702N20151205S0525.fits[SCI,3]    0.0
  tmpfile4362_702N20151205S0526.fits[SCI,3]    0.0
  tmpfile4362_702N20151205S0527.fits[SCI,3]    0.0
  tmpfile4362_702N20151205S0528.fits[SCI,3]    0.0
  tmpfile4362_702N20151205S0529.fits[SCI,3]    0.0

  Output image = tmpcombout4362_778, ncombine = 5
  Number rejected mask = tmpcombdq4362_779.pl
  Sigma image = tmpcombsig4362_780
WARNING - GEMCOMBINE: five or less images to combine.

Apr  9 11:41: IMCOMBINE
  combine = average, scale = none, zero = none, weight = none
  reject = avsigclip, mclip = yes, nkeep = 1
  lsigma = 3., hsigma = 3.
  blank = 0.
  statsec = Apr  9 11:41
                Images     Exp
  tmpfile4362_702N20151205S0525.fits[SCI,4]    0.0
  tmpfile4362_702N20151205S0526.fits[SCI,4]    0.0
  tmpfile4362_702N20151205S0527.fits[SCI,4]    0.0
  tmpfile4362_702N20151205S0528.fits[SCI,4]    0.0
  tmpfile4362_702N20151205S0529.fits[SCI,4]    0.0

  Output image = tmpcombout4362_782, ncombine = 5
  Number rejected mask = tmpcombdq4362_783.pl
  Sigma image = tmpcombsig4362_784
WARNING - GEMCOMBINE: five or less images to combine.

Apr  9 11:41: IMCOMBINE
  combine = average, scale = none, zero = none, weight = none
  reject = avsigclip, mclip = yes, nkeep = 1
  lsigma = 3., hsigma = 3.
  blank = 0.
  statsec = Apr  9 11:41
                Images     Exp
  tmpfile4362_702N20151205S0525.fits[SCI,5]    0.0
  tmpfile4362_702N20151205S0526.fits[SCI,5]    0.0
  tmpfile4362_702N20151205S0527.fits[SCI,5]    0.0
  tmpfile4362_702N20151205S0528.fits[SCI,5]    0.0
  tmpfile4362_702N20151205S0529.fits[SCI,5]    0.0

  Output image = tmpcombout4362_786, ncombine = 5
  Number rejected mask = tmpcombdq4362_787.pl
  Sigma image = tmpcombsig4362_788
WARNING - GEMCOMBINE: five or less images to combine.

Apr  9 11:41: IMCOMBINE
  combine = average, scale = none, zero = none, weight = none
  reject = avsigclip, mclip = yes, nkeep = 1
  lsigma = 3., hsigma = 3.
  blank = 0.
  statsec = Apr  9 11:41
                Images     Exp
  tmpfile4362_702N20151205S0525.fits[SCI,6]    0.0
  tmpfile4362_702N20151205S0526.fits[SCI,6]    0.0
  tmpfile4362_702N20151205S0527.fits[SCI,6]    0.0
  tmpfile4362_702N20151205S0528.fits[SCI,6]    0.0
  tmpfile4362_702N20151205S0529.fits[SCI,6]    0.0

  Output image = tmpcombout4362_790, ncombine = 5
  Number rejected mask = tmpcombdq4362_791.pl
  Sigma image = tmpcombsig4362_792
 
GEMCOMBINE -- Finished: Sat Apr  9 11:41:06 HST 2016
 
GEMCOMBINE -- Exit status: GOOD
--------------------------------------------------------------------------------

GBIAS: Exit status: GOOD.
----------------------------------------------------------------------------
Out[9]:
['N20151205S0525_bias.fits', 'N20151214S0346_bias.fits']

Visually inspect the processed biases


In [10]:
# WARNING: interactive.  It launches imexam.  Type 'q' to quit.
for biaskey in biases.keys():
    iraf.gdisplay(biases[biaskey]['procbias'], 1, fl_paste='yes')


GDISPLAY - Started: 2016-04-09T11:41:23

GDISPLAY: Temporary image name tmpout4362_795N20151214S0346_bias.fits

GMULTIAMP - Started: 2016-04-09T11:41:23

GMULTIAMP: Tiling image...
               Image tiled.

GMULTIAMP - Finished: 2016-04-09T11:41:25
GMULTIAMP - Exit status: GOOD

GDISPLAY: Displaying image...

GDISPLAY: Starting imexamine - quit with q

GDISPLAY - Finished: 2016-04-09T11:41:31


GDISPLAY - Started: 2016-04-09T11:41:31

GDISPLAY: Temporary image name tmpout4362_829N20151205S0525_bias.fits

GMULTIAMP - Started: 2016-04-09T11:41:31

GMULTIAMP: Tiling image...
               Image tiled.

GMULTIAMP - Finished: 2016-04-09T11:41:33
GMULTIAMP - Exit status: GOOD

GDISPLAY: Displaying image...

GDISPLAY: Starting imexamine - quit with q

GDISPLAY - Finished: 2016-04-09T11:41:36

STEP 5: Process the twilight flats

This will produce the twilight flat defined above. That flat will be used later to process the science frames.


In [11]:
os.chdir(redux_path)

for flatkey in flats.keys():
    iraf.imdelete('g//@'+flatkey+'.lis', verify='no')
    iraf.imdelete('rg//@'+flatkey+'.lis', verify='no')
    
    flatlist = flatkey+'.lis'
    procbias = os.path.join(procbias_path, flats[flatkey]['flatbias'])
    
    print 'Processing raw twilight flats'
    
    # gprepare and bias correct the raw flats
    iraf.gireduce('@'+flatlist, rawpath=raw_path, \
                  fl_over='yes', fl_trim='yes', \
                  fl_bias='yes', bias=procbias, fl_flat='no', \
                  fl_vardq='yes')


Processing raw twilight flats
----------------------------------------------------------------------------
GIREDUCE -- Sat Apr  9 11:41:48 HST 2016

----------------------------------------------------------------------------
GPREPARE -- Sat Apr  9 11:41:48 HST 2016

Input list    = N20151205S0423
Output list   = 
Output prefix = g
Raw path      = /data/workspace/DRWorkshopAAO/NGC3310/raw/
MDF dir       = gmos$data/
Add MDF       = no

Input  /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151205S0423.fits   Output  gN20151205S0423.fits

GPREPARE exit status: good.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
GPREPARE -- Sat Apr  9 11:41:49 HST 2016

Input list    = N20151205S0424
Output list   = 
Output prefix = g
Raw path      = /data/workspace/DRWorkshopAAO/NGC3310/raw/
MDF dir       = gmos$data/
Add MDF       = no

Input  /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151205S0424.fits   Output  gN20151205S0424.fits

GPREPARE exit status: good.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
GPREPARE -- Sat Apr  9 11:41:50 HST 2016

Input list    = N20151205S0425
Output list   = 
Output prefix = g
Raw path      = /data/workspace/DRWorkshopAAO/NGC3310/raw/
MDF dir       = gmos$data/
Add MDF       = no

Input  /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151205S0425.fits   Output  gN20151205S0425.fits

GPREPARE exit status: good.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
GPREPARE -- Sat Apr  9 11:41:52 HST 2016

Input list    = N20151205S0426
Output list   = 
Output prefix = g
Raw path      = /data/workspace/DRWorkshopAAO/NGC3310/raw/
MDF dir       = gmos$data/
Add MDF       = no

Input  /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151205S0426.fits   Output  gN20151205S0426.fits

GPREPARE exit status: good.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
GPREPARE -- Sat Apr  9 11:41:53 HST 2016

Input list    = N20151205S0427
Output list   = 
Output prefix = g
Raw path      = /data/workspace/DRWorkshopAAO/NGC3310/raw/
MDF dir       = gmos$data/
Add MDF       = no

Input  /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151205S0427.fits   Output  gN20151205S0427.fits

GPREPARE exit status: good.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
GPREPARE -- Sat Apr  9 11:41:54 HST 2016

Input list    = N20151205S0428
Output list   = 
Output prefix = g
Raw path      = /data/workspace/DRWorkshopAAO/NGC3310/raw/
MDF dir       = gmos$data/
Add MDF       = no

Input  /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151205S0428.fits   Output  gN20151205S0428.fits

GPREPARE exit status: good.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
GPREPARE -- Sat Apr  9 11:41:56 HST 2016

Input list    = N20151205S0429
Output list   = 
Output prefix = g
Raw path      = /data/workspace/DRWorkshopAAO/NGC3310/raw/
MDF dir       = gmos$data/
Add MDF       = no

Input  /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151205S0429.fits   Output  gN20151205S0429.fits

GPREPARE exit status: good.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
GPREPARE -- Sat Apr  9 11:41:57 HST 2016

Input list    = N20151205S0430
Output list   = 
Output prefix = g
Raw path      = /data/workspace/DRWorkshopAAO/NGC3310/raw/
MDF dir       = gmos$data/
Add MDF       = no

Input  /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151205S0430.fits   Output  gN20151205S0430.fits

GPREPARE exit status: good.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
GPREPARE -- Sat Apr  9 11:41:58 HST 2016

Input list    = N20151205S0431
Output list   = 
Output prefix = g
Raw path      = /data/workspace/DRWorkshopAAO/NGC3310/raw/
MDF dir       = gmos$data/
Add MDF       = no

Input  /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151205S0431.fits   Output  gN20151205S0431.fits

GPREPARE exit status: good.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
GPREPARE -- Sat Apr  9 11:42:00 HST 2016

Input list    = N20151205S0432
Output list   = 
Output prefix = g
Raw path      = /data/workspace/DRWorkshopAAO/NGC3310/raw/
MDF dir       = gmos$data/
Add MDF       = no

Input  /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151205S0432.fits   Output  gN20151205S0432.fits

GPREPARE exit status: good.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
GPREPARE -- Sat Apr  9 11:42:01 HST 2016

Input list    = N20151205S0433
Output list   = 
Output prefix = g
Raw path      = /data/workspace/DRWorkshopAAO/NGC3310/raw/
MDF dir       = gmos$data/
Add MDF       = no

Input  /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151205S0433.fits   Output  gN20151205S0433.fits

GPREPARE exit status: good.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
GPREPARE -- Sat Apr  9 11:42:02 HST 2016

Input list    = N20151205S0434
Output list   = 
Output prefix = g
Raw path      = /data/workspace/DRWorkshopAAO/NGC3310/raw/
MDF dir       = gmos$data/
Add MDF       = no

Input  /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151205S0434.fits   Output  gN20151205S0434.fits

GPREPARE exit status: good.
----------------------------------------------------------------------------

Input files:
gN20151205S0423
gN20151205S0424
gN20151205S0425
gN20151205S0426
gN20151205S0427
gN20151205S0428
gN20151205S0429
gN20151205S0430
gN20151205S0431
gN20151205S0432
gN20151205S0433
gN20151205S0434

Output files:
rgN20151205S0423
rgN20151205S0424
rgN20151205S0425
rgN20151205S0426
rgN20151205S0427
rgN20151205S0428
rgN20151205S0429
rgN20151205S0430
rgN20151205S0431
rgN20151205S0432
rgN20151205S0433
rgN20151205S0434

WARNING - GIREDUCE: Bad Pixel Mask filename is an empty string
                    Only saturated pixels will be flagged
GIREDUCE: Image rgN20151205S0423 overscan subtracted
GIREDUCE: Image rgN20151205S0424 overscan subtracted
GIREDUCE: Image rgN20151205S0425 overscan subtracted
GIREDUCE: Image rgN20151205S0426 overscan subtracted
GIREDUCE: Image rgN20151205S0427 overscan subtracted
GIREDUCE: Image rgN20151205S0428 overscan subtracted
GIREDUCE: Image rgN20151205S0429 overscan subtracted
GIREDUCE: Image rgN20151205S0430 overscan subtracted
GIREDUCE: Image rgN20151205S0431 overscan subtracted
GIREDUCE: Image rgN20151205S0432 overscan subtracted
GIREDUCE: Image rgN20151205S0433 overscan subtracted
GIREDUCE: Image rgN20151205S0434 overscan subtracted
GIREDUCE: Image rgN20151205S0423 trimmed
GIREDUCE: Image rgN20151205S0424 trimmed
GIREDUCE: Image rgN20151205S0425 trimmed
GIREDUCE: Image rgN20151205S0426 trimmed
GIREDUCE: Image rgN20151205S0427 trimmed
GIREDUCE: Image rgN20151205S0428 trimmed
GIREDUCE: Image rgN20151205S0429 trimmed
GIREDUCE: Image rgN20151205S0430 trimmed
GIREDUCE: Image rgN20151205S0431 trimmed
GIREDUCE: Image rgN20151205S0432 trimmed
GIREDUCE: Image rgN20151205S0433 trimmed
GIREDUCE: Image rgN20151205S0434 trimmed

Output image       Bias                 Flat               Dark       Scale 
rgN20151205S0423   /data/workspace/DRWorkshopAAO/NGC3310/calib/bias/N20151205S0525_bias INDEF              INDEF       0.00
GIREDUCE: Subtracted bias /data/workspace/DRWorkshopAAO/NGC3310/calib/bias/N20151205S0525_bias from rgN20151205S0423
GIREDUCE: multiplying image rgN20151205S0423 by gain
GIREDUCE: output counts in electrons
Output image       Bias                 Flat               Dark       Scale 
rgN20151205S0424   /data/workspace/DRWorkshopAAO/NGC3310/calib/bias/N20151205S0525_bias INDEF              INDEF       0.00
GIREDUCE: Subtracted bias /data/workspace/DRWorkshopAAO/NGC3310/calib/bias/N20151205S0525_bias from rgN20151205S0424
GIREDUCE: multiplying image rgN20151205S0424 by gain
GIREDUCE: output counts in electrons
Output image       Bias                 Flat               Dark       Scale 
rgN20151205S0425   /data/workspace/DRWorkshopAAO/NGC3310/calib/bias/N20151205S0525_bias INDEF              INDEF       0.00
GIREDUCE: Subtracted bias /data/workspace/DRWorkshopAAO/NGC3310/calib/bias/N20151205S0525_bias from rgN20151205S0425
GIREDUCE: multiplying image rgN20151205S0425 by gain
GIREDUCE: output counts in electrons
Output image       Bias                 Flat               Dark       Scale 
rgN20151205S0426   /data/workspace/DRWorkshopAAO/NGC3310/calib/bias/N20151205S0525_bias INDEF              INDEF       0.00
GIREDUCE: Subtracted bias /data/workspace/DRWorkshopAAO/NGC3310/calib/bias/N20151205S0525_bias from rgN20151205S0426
GIREDUCE: multiplying image rgN20151205S0426 by gain
GIREDUCE: output counts in electrons
Output image       Bias                 Flat               Dark       Scale 
rgN20151205S0427   /data/workspace/DRWorkshopAAO/NGC3310/calib/bias/N20151205S0525_bias INDEF              INDEF       0.00
GIREDUCE: Subtracted bias /data/workspace/DRWorkshopAAO/NGC3310/calib/bias/N20151205S0525_bias from rgN20151205S0427
GIREDUCE: multiplying image rgN20151205S0427 by gain
GIREDUCE: output counts in electrons
Output image       Bias                 Flat               Dark       Scale 
rgN20151205S0428   /data/workspace/DRWorkshopAAO/NGC3310/calib/bias/N20151205S0525_bias INDEF              INDEF       0.00
GIREDUCE: Subtracted bias /data/workspace/DRWorkshopAAO/NGC3310/calib/bias/N20151205S0525_bias from rgN20151205S0428
GIREDUCE: multiplying image rgN20151205S0428 by gain
GIREDUCE: output counts in electrons
Output image       Bias                 Flat               Dark       Scale 
rgN20151205S0429   /data/workspace/DRWorkshopAAO/NGC3310/calib/bias/N20151205S0525_bias INDEF              INDEF       0.00
GIREDUCE: Subtracted bias /data/workspace/DRWorkshopAAO/NGC3310/calib/bias/N20151205S0525_bias from rgN20151205S0429
GIREDUCE: multiplying image rgN20151205S0429 by gain
GIREDUCE: output counts in electrons
Output image       Bias                 Flat               Dark       Scale 
rgN20151205S0430   /data/workspace/DRWorkshopAAO/NGC3310/calib/bias/N20151205S0525_bias INDEF              INDEF       0.00
GIREDUCE: Subtracted bias /data/workspace/DRWorkshopAAO/NGC3310/calib/bias/N20151205S0525_bias from rgN20151205S0430
GIREDUCE: multiplying image rgN20151205S0430 by gain
GIREDUCE: output counts in electrons
Output image       Bias                 Flat               Dark       Scale 
rgN20151205S0431   /data/workspace/DRWorkshopAAO/NGC3310/calib/bias/N20151205S0525_bias INDEF              INDEF       0.00
GIREDUCE: Subtracted bias /data/workspace/DRWorkshopAAO/NGC3310/calib/bias/N20151205S0525_bias from rgN20151205S0431
GIREDUCE: multiplying image rgN20151205S0431 by gain
GIREDUCE: output counts in electrons
Output image       Bias                 Flat               Dark       Scale 
rgN20151205S0432   /data/workspace/DRWorkshopAAO/NGC3310/calib/bias/N20151205S0525_bias INDEF              INDEF       0.00
GIREDUCE: Subtracted bias /data/workspace/DRWorkshopAAO/NGC3310/calib/bias/N20151205S0525_bias from rgN20151205S0432
GIREDUCE: multiplying image rgN20151205S0432 by gain
GIREDUCE: output counts in electrons
Output image       Bias                 Flat               Dark       Scale 
rgN20151205S0433   /data/workspace/DRWorkshopAAO/NGC3310/calib/bias/N20151205S0525_bias INDEF              INDEF       0.00
GIREDUCE: Subtracted bias /data/workspace/DRWorkshopAAO/NGC3310/calib/bias/N20151205S0525_bias from rgN20151205S0433
GIREDUCE: multiplying image rgN20151205S0433 by gain
GIREDUCE: output counts in electrons
Output image       Bias                 Flat               Dark       Scale 
rgN20151205S0434   /data/workspace/DRWorkshopAAO/NGC3310/calib/bias/N20151205S0525_bias INDEF              INDEF       0.00
GIREDUCE: Subtracted bias /data/workspace/DRWorkshopAAO/NGC3310/calib/bias/N20151205S0525_bias from rgN20151205S0434
GIREDUCE: multiplying image rgN20151205S0434 by gain
GIREDUCE: output counts in electrons

GIREDUCE - Cleaning up -- Sat Apr  9 11:46:28 HST 2016

GIREDUCE -- Sat Apr  9 11:46:28 HST 2016
GIREDUCE exit status:  good.
----------------------------------------------------------------------------

In [12]:
os.chdir(redux_path)

for flatkey in flats.keys():
    iraf.imdelete(flats[flatkey]['procflat'], verify='no')
    
    flatlist = flatkey+'.lis'
    procflat = flats[flatkey]['procflat']
    
    print 'Creating twilight flat ', procflat
    
    # Create the processed flat
    iraf.giflat('rg//@'+flatlist, outflat=procflat, fl_vardq='yes')
    
    # Copy the processed flat to the calibration directory
    shutil.copy(procflat, procflat_path)

# The processed flats are:
os.listdir(procflat_path)


Creating twilight flat  N20151205S0018_flat_g.fits
----------------------------------------------------------------------------
GIFLAT -- Sat Apr  9 11:47:08 HST 2016
 
Flat field images = rg//@flat_20151205.lis
Output flat field image = N20151205S0018_flat_g.fits
 
WARNING - GIFLAT: using previously gireduce'd image: rgN20151205S0423
WARNING - GIFLAT: using previously gireduce'd image: rgN20151205S0424
WARNING - GIFLAT: using previously gireduce'd image: rgN20151205S0425
WARNING - GIFLAT: using previously gireduce'd image: rgN20151205S0426
WARNING - GIFLAT: using previously gireduce'd image: rgN20151205S0427
WARNING - GIFLAT: using previously gireduce'd image: rgN20151205S0428
WARNING - GIFLAT: using previously gireduce'd image: rgN20151205S0429
WARNING - GIFLAT: using previously gireduce'd image: rgN20151205S0430
WARNING - GIFLAT: using previously gireduce'd image: rgN20151205S0431
WARNING - GIFLAT: using previously gireduce'd image: rgN20151205S0432
WARNING - GIFLAT: using previously gireduce'd image: rgN20151205S0433
WARNING - GIFLAT: using previously gireduce'd image: rgN20151205S0434
Using input files:
rgN20151205S0423
rgN20151205S0424
rgN20151205S0425
rgN20151205S0426
rgN20151205S0427
rgN20151205S0428
rgN20151205S0429
rgN20151205S0430
rgN20151205S0431
rgN20151205S0432
rgN20151205S0433
rgN20151205S0434
Using STATSEC: [50:900,50:2250] from CCD2
Using NORMSEC: [50:900,50:2250] from CCD2
GIFLAT: Normalization factor 67196.42

GIFLAT exit status: good.
----------------------------------------------------------------------------
Out[12]:
['N20151205S0018_flat_g.fits']

Visually inspect the processed twilight flats


In [13]:
for flatkey in flats.keys():
    iraf.gdisplay(flats[flatkey]['procflat'], 1, fl_paste='yes')


GDISPLAY - Started: 2016-04-09T11:48:09

GDISPLAY: Temporary image name tmpout4362_1388N20151205S0018_flat_g.fits

GMULTIAMP - Started: 2016-04-09T11:48:09

GMULTIAMP: Tiling image...
               Image tiled.

GMULTIAMP - Finished: 2016-04-09T11:48:11
GMULTIAMP - Exit status: GOOD

GDISPLAY: Displaying image...

GDISPLAY: Starting imexamine - quit with q

GDISPLAY - Finished: 2016-04-09T11:48:16

STEP 6: Process the fringe frame

STEP 7: Process the target

There is no significant fringing in the g-band. No extra fringing correction will be necessary. If you do want to learn about how to correct for fringing, see the i-band notebook.

All we need to do here is the straighforward processing, i.e. the bias and flat correction. (And overscan and trim.)

STEP 7.1: Bias and flat fielding of the target


In [14]:
os.chdir(redux_path)

iraf.imdelete('g//@sci.lis', verify='no')
iraf.imdelete('rg//@sci.lis', verify='no')

iraf.gireduce('@sci.lis', rawpath=raw_path, fl_over='yes', fl_trim='yes', \
              fl_bias='yes', bias=science['scibias'], \
              fl_flat='yes', flat1=science['sciflat'], \
              fl_vardq='yes')


----------------------------------------------------------------------------
GIREDUCE -- Sat Apr  9 11:48:32 HST 2016

----------------------------------------------------------------------------
GPREPARE -- Sat Apr  9 11:48:32 HST 2016

Input list    = N20151214S0247
Output list   = 
Output prefix = g
Raw path      = /data/workspace/DRWorkshopAAO/NGC3310/raw/
MDF dir       = gmos$data/
Add MDF       = no

Input  /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151214S0247.fits   Output  gN20151214S0247.fits

GPREPARE exit status: good.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
GPREPARE -- Sat Apr  9 11:48:34 HST 2016

Input list    = N20151214S0248
Output list   = 
Output prefix = g
Raw path      = /data/workspace/DRWorkshopAAO/NGC3310/raw/
MDF dir       = gmos$data/
Add MDF       = no

Input  /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151214S0248.fits   Output  gN20151214S0248.fits

GPREPARE exit status: good.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
GPREPARE -- Sat Apr  9 11:48:35 HST 2016

Input list    = N20151214S0249
Output list   = 
Output prefix = g
Raw path      = /data/workspace/DRWorkshopAAO/NGC3310/raw/
MDF dir       = gmos$data/
Add MDF       = no

Input  /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151214S0249.fits   Output  gN20151214S0249.fits

GPREPARE exit status: good.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
GPREPARE -- Sat Apr  9 11:48:36 HST 2016

Input list    = N20151214S0250
Output list   = 
Output prefix = g
Raw path      = /data/workspace/DRWorkshopAAO/NGC3310/raw/
MDF dir       = gmos$data/
Add MDF       = no

Input  /data/workspace/DRWorkshopAAO/NGC3310/raw/N20151214S0250.fits   Output  gN20151214S0250.fits

GPREPARE exit status: good.
----------------------------------------------------------------------------

Input files:
gN20151214S0247
gN20151214S0248
gN20151214S0249
gN20151214S0250

Output files:
rgN20151214S0247
rgN20151214S0248
rgN20151214S0249
rgN20151214S0250

WARNING - GIREDUCE: Bad Pixel Mask filename is an empty string
                    Only saturated pixels will be flagged
GIREDUCE: Image rgN20151214S0247 overscan subtracted
GIREDUCE: Image rgN20151214S0248 overscan subtracted
GIREDUCE: Image rgN20151214S0249 overscan subtracted
GIREDUCE: Image rgN20151214S0250 overscan subtracted
GIREDUCE: Image rgN20151214S0247 trimmed
GIREDUCE: Image rgN20151214S0248 trimmed
GIREDUCE: Image rgN20151214S0249 trimmed
GIREDUCE: Image rgN20151214S0250 trimmed

Output image       Bias                 Flat               Dark       Scale 
rgN20151214S0247   N20151214S0346_bias  N20151205S0018_flat_g INDEF       0.00
GIREDUCE: Subtracted bias N20151214S0346_bias from rgN20151214S0247
GIREDUCE: Divided image rgN20151214S0247 by flatfield N20151205S0018_flat_g
GIREDUCE: multiplying image rgN20151214S0247 by gain
GIREDUCE: output counts in electrons
Output image       Bias                 Flat               Dark       Scale 
rgN20151214S0248   N20151214S0346_bias  N20151205S0018_flat_g INDEF       0.00
GIREDUCE: Subtracted bias N20151214S0346_bias from rgN20151214S0248
GIREDUCE: Divided image rgN20151214S0248 by flatfield N20151205S0018_flat_g
GIREDUCE: multiplying image rgN20151214S0248 by gain
GIREDUCE: output counts in electrons
Output image       Bias                 Flat               Dark       Scale 
rgN20151214S0249   N20151214S0346_bias  N20151205S0018_flat_g INDEF       0.00
GIREDUCE: Subtracted bias N20151214S0346_bias from rgN20151214S0249
GIREDUCE: Divided image rgN20151214S0249 by flatfield N20151205S0018_flat_g
GIREDUCE: multiplying image rgN20151214S0249 by gain
GIREDUCE: output counts in electrons
Output image       Bias                 Flat               Dark       Scale 
rgN20151214S0250   N20151214S0346_bias  N20151205S0018_flat_g INDEF       0.00
GIREDUCE: Subtracted bias N20151214S0346_bias from rgN20151214S0250
GIREDUCE: Divided image rgN20151214S0250 by flatfield N20151205S0018_flat_g
GIREDUCE: multiplying image rgN20151214S0250 by gain
GIREDUCE: output counts in electrons

GIREDUCE - Cleaning up -- Sat Apr  9 11:50:13 HST 2016

GIREDUCE -- Sat Apr  9 11:50:13 HST 2016
GIREDUCE exit status:  good.
----------------------------------------------------------------------------

Visually inspect the reduce science frames


In [15]:
sciframes = open('sci.lis', 'r')
for line in sciframes:
    frame = line.strip()
    iraf.gdisplay('rg'+frame, 1, fl_paste='yes')
sciframes.close()


GDISPLAY - Started: 2016-04-09T11:50:34

GDISPLAY: Temporary image name tmpout4362_1516rgN20151214S0247.fits

GMULTIAMP - Started: 2016-04-09T11:50:34

GMULTIAMP: Tiling image...
               Image tiled.

GMULTIAMP - Finished: 2016-04-09T11:50:36
GMULTIAMP - Exit status: GOOD

GDISPLAY: Displaying image...

GDISPLAY: Starting imexamine - quit with q

GDISPLAY - Finished: 2016-04-09T11:50:46


GDISPLAY - Started: 2016-04-09T11:50:46

GDISPLAY: Temporary image name tmpout4362_1550rgN20151214S0248.fits

GMULTIAMP - Started: 2016-04-09T11:50:46

GMULTIAMP: Tiling image...
               Image tiled.

GMULTIAMP - Finished: 2016-04-09T11:50:48
GMULTIAMP - Exit status: GOOD

GDISPLAY: Displaying image...

GDISPLAY: Starting imexamine - quit with q

GDISPLAY - Finished: 2016-04-09T11:50:53


GDISPLAY - Started: 2016-04-09T11:50:53

GDISPLAY: Temporary image name tmpout4362_1584rgN20151214S0249.fits

GMULTIAMP - Started: 2016-04-09T11:50:53

GMULTIAMP: Tiling image...
               Image tiled.

GMULTIAMP - Finished: 2016-04-09T11:50:55
GMULTIAMP - Exit status: GOOD

GDISPLAY: Displaying image...

GDISPLAY: Starting imexamine - quit with q

GDISPLAY - Finished: 2016-04-09T11:50:56


GDISPLAY - Started: 2016-04-09T11:50:56

GDISPLAY: Temporary image name tmpout4362_1618rgN20151214S0250.fits

GMULTIAMP - Started: 2016-04-09T11:50:57

GMULTIAMP: Tiling image...
               Image tiled.

GMULTIAMP - Finished: 2016-04-09T11:50:59
GMULTIAMP - Exit status: GOOD

GDISPLAY: Displaying image...

GDISPLAY: Starting imexamine - quit with q

GDISPLAY - Finished: 2016-04-09T11:51:02

STEP 7.2: Fringe removal

STEP 8: Mosaic the reduced target frames


In [16]:
iraf.imdelete('mrg//@sci.lis', verify='no')

iraf.gmosaic('rg//@sci.lis', fl_vardq='yes')


GMOSAIC 
GMOSAIC -------------------------------------------------------------------
GMOSAIC Log opened at [Sat 11:51:15 09-Apr-2016]
GMOSAIC 
GMOSAIC --------------------
GMOSAIC Input Parameters:
GMOSAIC      inimages       = rg//@sci.lis
GMOSAIC      outimages      = 
GMOSAIC      outpref        = m
GMOSAIC      fl_paste       = no
GMOSAIC      fl_vardq       = yes
GMOSAIC      fl_fixpix      = no
GMOSAIC      fl_clean       = yes
GMOSAIC      fl_fulldq      = no
GMOSAIC      bitflags       = all
GMOSAIC      dqthresh       = 0.1
GMOSAIC      geointer       = linear
GMOSAIC      gap            = default
GMOSAIC      bpmfile        = gmos$data/chipgaps.dat
GMOSAIC      statsec        = default
GMOSAIC      obsmode        = IMAGE
GMOSAIC      sci_ext        = SCI
GMOSAIC      var_ext        = VAR
GMOSAIC      dq_ext         = DQ
GMOSAIC      key_detsec     = DETSEC
GMOSAIC      key_ccdsec     = CCDSEC
GMOSAIC      key_datsec     = DATASEC
GMOSAIC      key_ccdsum     = CCDSUM
GMOSAIC      key_obsmode    = OBSMODE
GMOSAIC      logfile        = 
GMOSAIC      verbose        = yes
GMOSAIC      fl_real        = no
GMOSAIC --------------------
GMOSAIC Input: rgN20151214S0247  Output: mrgN20151214S0247.fits
GMOSAIC imcopy  rgN20151214S0247[SCI,2][1:512,1:2304]  tmptile4362_1667[1,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0247[SCI,1][1:512,1:2304]  tmptile4362_1667[1,append][513:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0247[VAR,2][1:512,1:2304]  tmptile4362_1667[2,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0247[VAR,1][1:512,1:2304]  tmptile4362_1667[2,append][513:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0247[DQ,2][1:512,1:2304]  tmptile4362_1667[3,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0247[DQ,1][1:512,1:2304]  tmptile4362_1667[3,append][513:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0247[SCI,4][1:512,1:2304]  tmptile4362_1668[1,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0247[SCI,3][1:512,1:2304]  tmptile4362_1668[1,append][513:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0247[VAR,4][1:512,1:2304]  tmptile4362_1668[2,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0247[VAR,3][1:512,1:2304]  tmptile4362_1668[2,append][513:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0247[DQ,4][1:512,1:2304]  tmptile4362_1668[3,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0247[DQ,3][1:512,1:2304]  tmptile4362_1668[3,append][513:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0247[SCI,5][1:512,1:2304]  tmptile4362_1669[1,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0247[SCI,6][1:512,1:2304]  tmptile4362_1669[1,append][513:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0247[VAR,5][1:512,1:2304]  tmptile4362_1669[2,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0247[VAR,6][1:512,1:2304]  tmptile4362_1669[2,append][513:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0247[DQ,5][1:512,1:2304]  tmptile4362_1669[3,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0247[DQ,6][1:512,1:2304]  tmptile4362_1669[3,append][513:1024,1:2304]  INDEF  0.
GMOSAIC Setting rotation Xrot[1]=-0.009000, Yrot[1]=-0.009000
GMOSAIC Setting rotation Xrot[2]= 0.000000, Yrot[2]= 0.000000
GMOSAIC Setting rotation Xrot[3]=-0.003000, Yrot[3]=-0.003000
GMOSAIC 
GMOSAIC Transforming image tmpimg4362_1663[SCI,1][1:1024,1:2304] to image tmpchipsci4362_1670
GMOSAIC     xshift: 2.03 yshift: 0.29 xmag: 1.00 ymag: 1.00 xrot: 359.99 yrot: 359.99
GMOSAIC 
GMOSAIC Transforming image tmpimg4362_1663[VAR,1][1:1024,1:2304] to image tmpchipvar4362_1671
GMOSAIC     xshift: 2.03 yshift: 0.29 xmag: 1.00 ymag: 1.00 xrot: 359.99 yrot: 359.99
GMOSAIC 
GMOSAIC Transforming image tmpimg4362_1663[DQ,1][1:1024,1:2304] to image tmpdq_transimg4362_1659.fits
GMOSAIC     xshift: 2.03 yshift: 0.29 xmag: 1.00 ymag: 1.00 xrot: 359.99 yrot: 359.99
GMOSAIC 
GMOSAIC Transforming image tmpimg4362_1663[SCI,2][1:1024,1:2304] to image tmpchipsci4362_1673
GMOSAIC     xshift: 0.00 yshift: 0.00 xmag: 1.00 ymag: 1.00 xrot: 0.00 yrot: 0.00
GMOSAIC 
GMOSAIC Transforming image tmpimg4362_1663[VAR,2][1:1024,1:2304] to image tmpchipvar4362_1674
GMOSAIC     xshift: 0.00 yshift: 0.00 xmag: 1.00 ymag: 1.00 xrot: 0.00 yrot: 0.00
GMOSAIC 
GMOSAIC Transforming image tmpimg4362_1663[SCI,3][1:1024,1:2304] to image tmpchipsci4362_1676
GMOSAIC     xshift: -1.84 yshift: -1.05 xmag: 1.00 ymag: 1.00 xrot: 360.00 yrot: 360.00
GMOSAIC 
GMOSAIC Transforming image tmpimg4362_1663[VAR,3][1:1024,1:2304] to image tmpchipvar4362_1677
GMOSAIC     xshift: -1.84 yshift: -1.05 xmag: 1.00 ymag: 1.00 xrot: 360.00 yrot: 360.00
GMOSAIC 
GMOSAIC Transforming image tmpimg4362_1663[DQ,3][1:1024,1:2304] to image tmpdq_transimg4362_1659.fits
GMOSAIC     xshift: -1.84 yshift: -1.05 xmag: 1.00 ymag: 1.00 xrot: 360.00 yrot: 360.00
GMOSAIC imcopy  tmpchipsci4362_1670  mrgN20151214S0247.fits[1,append][1:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  tmpchipsci4362_1673  mrgN20151214S0247.fits[1,append][1043:2066,1:2304]  INDEF  0.
GMOSAIC imcopy  tmpchipsci4362_1676  mrgN20151214S0247.fits[1,append][2085:3108,1:2304]  INDEF  0.
GMOSAIC imcopy  tmpchipvar4362_1671  mrgN20151214S0247.fits[2,append][1:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  tmpchipvar4362_1674  mrgN20151214S0247.fits[2,append][1043:2066,1:2304]  INDEF  0.
GMOSAIC imcopy  tmpchipvar4362_1677  mrgN20151214S0247.fits[2,append][2085:3108,1:2304]  INDEF  0.
GMOSAIC imcopy  tmpchipdq4362_1672  mrgN20151214S0247.fits[3,append][1:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  tmpchipdq4362_1675  mrgN20151214S0247.fits[3,append][1043:2066,1:2304]  INDEF  0.
GMOSAIC imcopy  tmpchipdq4362_1678  mrgN20151214S0247.fits[3,append][2085:3108,1:2304]  INDEF  0.
gmos$data/gmos-n_bpm_e2v_22_6amp_v1_mosaic.pl
GMOSAIC Cleaning areas outside imaging field, cleaning value = 1012.435
GMOSAIC Input: rgN20151214S0248  Output: mrgN20151214S0248.fits
GMOSAIC imcopy  rgN20151214S0248[SCI,2][1:512,1:2304]  tmptile4362_1683[1,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0248[SCI,1][1:512,1:2304]  tmptile4362_1683[1,append][513:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0248[VAR,2][1:512,1:2304]  tmptile4362_1683[2,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0248[VAR,1][1:512,1:2304]  tmptile4362_1683[2,append][513:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0248[DQ,2][1:512,1:2304]  tmptile4362_1683[3,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0248[DQ,1][1:512,1:2304]  tmptile4362_1683[3,append][513:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0248[SCI,4][1:512,1:2304]  tmptile4362_1684[1,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0248[SCI,3][1:512,1:2304]  tmptile4362_1684[1,append][513:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0248[VAR,4][1:512,1:2304]  tmptile4362_1684[2,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0248[VAR,3][1:512,1:2304]  tmptile4362_1684[2,append][513:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0248[DQ,4][1:512,1:2304]  tmptile4362_1684[3,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0248[DQ,3][1:512,1:2304]  tmptile4362_1684[3,append][513:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0248[SCI,5][1:512,1:2304]  tmptile4362_1685[1,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0248[SCI,6][1:512,1:2304]  tmptile4362_1685[1,append][513:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0248[VAR,5][1:512,1:2304]  tmptile4362_1685[2,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0248[VAR,6][1:512,1:2304]  tmptile4362_1685[2,append][513:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0248[DQ,5][1:512,1:2304]  tmptile4362_1685[3,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0248[DQ,6][1:512,1:2304]  tmptile4362_1685[3,append][513:1024,1:2304]  INDEF  0.
GMOSAIC Setting rotation Xrot[1]=-0.009000, Yrot[1]=-0.009000
GMOSAIC Setting rotation Xrot[2]= 0.000000, Yrot[2]= 0.000000
GMOSAIC Setting rotation Xrot[3]=-0.003000, Yrot[3]=-0.003000
GMOSAIC 
GMOSAIC Transforming image tmpimg4362_1679[SCI,1][1:1024,1:2304] to image tmpchipsci4362_1686
GMOSAIC     xshift: 2.03 yshift: 0.29 xmag: 1.00 ymag: 1.00 xrot: 359.99 yrot: 359.99
GMOSAIC 
GMOSAIC Transforming image tmpimg4362_1679[VAR,1][1:1024,1:2304] to image tmpchipvar4362_1687
GMOSAIC     xshift: 2.03 yshift: 0.29 xmag: 1.00 ymag: 1.00 xrot: 359.99 yrot: 359.99
GMOSAIC 
GMOSAIC Transforming image tmpimg4362_1679[DQ,1][1:1024,1:2304] to image tmpdq_transimg4362_1659.fits
GMOSAIC     xshift: 2.03 yshift: 0.29 xmag: 1.00 ymag: 1.00 xrot: 359.99 yrot: 359.99
GMOSAIC 
GMOSAIC Transforming image tmpimg4362_1679[SCI,2][1:1024,1:2304] to image tmpchipsci4362_1689
GMOSAIC     xshift: 0.00 yshift: 0.00 xmag: 1.00 ymag: 1.00 xrot: 0.00 yrot: 0.00
GMOSAIC 
GMOSAIC Transforming image tmpimg4362_1679[VAR,2][1:1024,1:2304] to image tmpchipvar4362_1690
GMOSAIC     xshift: 0.00 yshift: 0.00 xmag: 1.00 ymag: 1.00 xrot: 0.00 yrot: 0.00
GMOSAIC 
GMOSAIC Transforming image tmpimg4362_1679[SCI,3][1:1024,1:2304] to image tmpchipsci4362_1692
GMOSAIC     xshift: -1.84 yshift: -1.05 xmag: 1.00 ymag: 1.00 xrot: 360.00 yrot: 360.00
GMOSAIC 
GMOSAIC Transforming image tmpimg4362_1679[VAR,3][1:1024,1:2304] to image tmpchipvar4362_1693
GMOSAIC     xshift: -1.84 yshift: -1.05 xmag: 1.00 ymag: 1.00 xrot: 360.00 yrot: 360.00
GMOSAIC 
GMOSAIC Transforming image tmpimg4362_1679[DQ,3][1:1024,1:2304] to image tmpdq_transimg4362_1659.fits
GMOSAIC     xshift: -1.84 yshift: -1.05 xmag: 1.00 ymag: 1.00 xrot: 360.00 yrot: 360.00
GMOSAIC imcopy  tmpchipsci4362_1686  mrgN20151214S0248.fits[1,append][1:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  tmpchipsci4362_1689  mrgN20151214S0248.fits[1,append][1043:2066,1:2304]  INDEF  0.
GMOSAIC imcopy  tmpchipsci4362_1692  mrgN20151214S0248.fits[1,append][2085:3108,1:2304]  INDEF  0.
GMOSAIC imcopy  tmpchipvar4362_1687  mrgN20151214S0248.fits[2,append][1:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  tmpchipvar4362_1690  mrgN20151214S0248.fits[2,append][1043:2066,1:2304]  INDEF  0.
GMOSAIC imcopy  tmpchipvar4362_1693  mrgN20151214S0248.fits[2,append][2085:3108,1:2304]  INDEF  0.
GMOSAIC imcopy  tmpchipdq4362_1688  mrgN20151214S0248.fits[3,append][1:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  tmpchipdq4362_1691  mrgN20151214S0248.fits[3,append][1043:2066,1:2304]  INDEF  0.
GMOSAIC imcopy  tmpchipdq4362_1694  mrgN20151214S0248.fits[3,append][2085:3108,1:2304]  INDEF  0.
gmos$data/gmos-n_bpm_e2v_22_6amp_v1_mosaic.pl
GMOSAIC Cleaning areas outside imaging field, cleaning value = 1009.446
GMOSAIC Input: rgN20151214S0249  Output: mrgN20151214S0249.fits
GMOSAIC imcopy  rgN20151214S0249[SCI,2][1:512,1:2304]  tmptile4362_1699[1,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0249[SCI,1][1:512,1:2304]  tmptile4362_1699[1,append][513:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0249[VAR,2][1:512,1:2304]  tmptile4362_1699[2,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0249[VAR,1][1:512,1:2304]  tmptile4362_1699[2,append][513:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0249[DQ,2][1:512,1:2304]  tmptile4362_1699[3,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0249[DQ,1][1:512,1:2304]  tmptile4362_1699[3,append][513:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0249[SCI,4][1:512,1:2304]  tmptile4362_1700[1,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0249[SCI,3][1:512,1:2304]  tmptile4362_1700[1,append][513:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0249[VAR,4][1:512,1:2304]  tmptile4362_1700[2,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0249[VAR,3][1:512,1:2304]  tmptile4362_1700[2,append][513:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0249[DQ,4][1:512,1:2304]  tmptile4362_1700[3,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0249[DQ,3][1:512,1:2304]  tmptile4362_1700[3,append][513:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0249[SCI,5][1:512,1:2304]  tmptile4362_1701[1,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0249[SCI,6][1:512,1:2304]  tmptile4362_1701[1,append][513:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0249[VAR,5][1:512,1:2304]  tmptile4362_1701[2,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0249[VAR,6][1:512,1:2304]  tmptile4362_1701[2,append][513:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0249[DQ,5][1:512,1:2304]  tmptile4362_1701[3,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0249[DQ,6][1:512,1:2304]  tmptile4362_1701[3,append][513:1024,1:2304]  INDEF  0.
GMOSAIC Setting rotation Xrot[1]=-0.009000, Yrot[1]=-0.009000
GMOSAIC Setting rotation Xrot[2]= 0.000000, Yrot[2]= 0.000000
GMOSAIC Setting rotation Xrot[3]=-0.003000, Yrot[3]=-0.003000
GMOSAIC 
GMOSAIC Transforming image tmpimg4362_1695[SCI,1][1:1024,1:2304] to image tmpchipsci4362_1702
GMOSAIC     xshift: 2.03 yshift: 0.29 xmag: 1.00 ymag: 1.00 xrot: 359.99 yrot: 359.99
GMOSAIC 
GMOSAIC Transforming image tmpimg4362_1695[VAR,1][1:1024,1:2304] to image tmpchipvar4362_1703
GMOSAIC     xshift: 2.03 yshift: 0.29 xmag: 1.00 ymag: 1.00 xrot: 359.99 yrot: 359.99
GMOSAIC 
GMOSAIC Transforming image tmpimg4362_1695[DQ,1][1:1024,1:2304] to image tmpdq_transimg4362_1659.fits
GMOSAIC     xshift: 2.03 yshift: 0.29 xmag: 1.00 ymag: 1.00 xrot: 359.99 yrot: 359.99
GMOSAIC 
GMOSAIC Transforming image tmpimg4362_1695[SCI,2][1:1024,1:2304] to image tmpchipsci4362_1705
GMOSAIC     xshift: 0.00 yshift: 0.00 xmag: 1.00 ymag: 1.00 xrot: 0.00 yrot: 0.00
GMOSAIC 
GMOSAIC Transforming image tmpimg4362_1695[VAR,2][1:1024,1:2304] to image tmpchipvar4362_1706
GMOSAIC     xshift: 0.00 yshift: 0.00 xmag: 1.00 ymag: 1.00 xrot: 0.00 yrot: 0.00
GMOSAIC 
GMOSAIC Transforming image tmpimg4362_1695[SCI,3][1:1024,1:2304] to image tmpchipsci4362_1708
GMOSAIC     xshift: -1.84 yshift: -1.05 xmag: 1.00 ymag: 1.00 xrot: 360.00 yrot: 360.00
GMOSAIC 
GMOSAIC Transforming image tmpimg4362_1695[VAR,3][1:1024,1:2304] to image tmpchipvar4362_1709
GMOSAIC     xshift: -1.84 yshift: -1.05 xmag: 1.00 ymag: 1.00 xrot: 360.00 yrot: 360.00
GMOSAIC 
GMOSAIC Transforming image tmpimg4362_1695[DQ,3][1:1024,1:2304] to image tmpdq_transimg4362_1659.fits
GMOSAIC     xshift: -1.84 yshift: -1.05 xmag: 1.00 ymag: 1.00 xrot: 360.00 yrot: 360.00
GMOSAIC imcopy  tmpchipsci4362_1702  mrgN20151214S0249.fits[1,append][1:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  tmpchipsci4362_1705  mrgN20151214S0249.fits[1,append][1043:2066,1:2304]  INDEF  0.
GMOSAIC imcopy  tmpchipsci4362_1708  mrgN20151214S0249.fits[1,append][2085:3108,1:2304]  INDEF  0.
GMOSAIC imcopy  tmpchipvar4362_1703  mrgN20151214S0249.fits[2,append][1:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  tmpchipvar4362_1706  mrgN20151214S0249.fits[2,append][1043:2066,1:2304]  INDEF  0.
GMOSAIC imcopy  tmpchipvar4362_1709  mrgN20151214S0249.fits[2,append][2085:3108,1:2304]  INDEF  0.
GMOSAIC imcopy  tmpchipdq4362_1704  mrgN20151214S0249.fits[3,append][1:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  tmpchipdq4362_1707  mrgN20151214S0249.fits[3,append][1043:2066,1:2304]  INDEF  0.
GMOSAIC imcopy  tmpchipdq4362_1710  mrgN20151214S0249.fits[3,append][2085:3108,1:2304]  INDEF  0.
gmos$data/gmos-n_bpm_e2v_22_6amp_v1_mosaic.pl
GMOSAIC Cleaning areas outside imaging field, cleaning value = 999.7203
GMOSAIC Input: rgN20151214S0250  Output: mrgN20151214S0250.fits
GMOSAIC imcopy  rgN20151214S0250[SCI,2][1:512,1:2304]  tmptile4362_1715[1,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0250[SCI,1][1:512,1:2304]  tmptile4362_1715[1,append][513:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0250[VAR,2][1:512,1:2304]  tmptile4362_1715[2,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0250[VAR,1][1:512,1:2304]  tmptile4362_1715[2,append][513:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0250[DQ,2][1:512,1:2304]  tmptile4362_1715[3,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0250[DQ,1][1:512,1:2304]  tmptile4362_1715[3,append][513:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0250[SCI,4][1:512,1:2304]  tmptile4362_1716[1,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0250[SCI,3][1:512,1:2304]  tmptile4362_1716[1,append][513:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0250[VAR,4][1:512,1:2304]  tmptile4362_1716[2,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0250[VAR,3][1:512,1:2304]  tmptile4362_1716[2,append][513:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0250[DQ,4][1:512,1:2304]  tmptile4362_1716[3,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0250[DQ,3][1:512,1:2304]  tmptile4362_1716[3,append][513:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0250[SCI,5][1:512,1:2304]  tmptile4362_1717[1,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0250[SCI,6][1:512,1:2304]  tmptile4362_1717[1,append][513:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0250[VAR,5][1:512,1:2304]  tmptile4362_1717[2,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0250[VAR,6][1:512,1:2304]  tmptile4362_1717[2,append][513:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0250[DQ,5][1:512,1:2304]  tmptile4362_1717[3,append][1:512,1:2304]  INDEF  0.
GMOSAIC imcopy  rgN20151214S0250[DQ,6][1:512,1:2304]  tmptile4362_1717[3,append][513:1024,1:2304]  INDEF  0.
GMOSAIC Setting rotation Xrot[1]=-0.009000, Yrot[1]=-0.009000
GMOSAIC Setting rotation Xrot[2]= 0.000000, Yrot[2]= 0.000000
GMOSAIC Setting rotation Xrot[3]=-0.003000, Yrot[3]=-0.003000
GMOSAIC 
GMOSAIC Transforming image tmpimg4362_1711[SCI,1][1:1024,1:2304] to image tmpchipsci4362_1718
GMOSAIC     xshift: 2.03 yshift: 0.29 xmag: 1.00 ymag: 1.00 xrot: 359.99 yrot: 359.99
GMOSAIC 
GMOSAIC Transforming image tmpimg4362_1711[VAR,1][1:1024,1:2304] to image tmpchipvar4362_1719
GMOSAIC     xshift: 2.03 yshift: 0.29 xmag: 1.00 ymag: 1.00 xrot: 359.99 yrot: 359.99
GMOSAIC 
GMOSAIC Transforming image tmpimg4362_1711[DQ,1][1:1024,1:2304] to image tmpdq_transimg4362_1659.fits
GMOSAIC     xshift: 2.03 yshift: 0.29 xmag: 1.00 ymag: 1.00 xrot: 359.99 yrot: 359.99
GMOSAIC 
GMOSAIC Transforming image tmpimg4362_1711[SCI,2][1:1024,1:2304] to image tmpchipsci4362_1721
GMOSAIC     xshift: 0.00 yshift: 0.00 xmag: 1.00 ymag: 1.00 xrot: 0.00 yrot: 0.00
GMOSAIC 
GMOSAIC Transforming image tmpimg4362_1711[VAR,2][1:1024,1:2304] to image tmpchipvar4362_1722
GMOSAIC     xshift: 0.00 yshift: 0.00 xmag: 1.00 ymag: 1.00 xrot: 0.00 yrot: 0.00
GMOSAIC 
GMOSAIC Transforming image tmpimg4362_1711[SCI,3][1:1024,1:2304] to image tmpchipsci4362_1724
GMOSAIC     xshift: -1.84 yshift: -1.05 xmag: 1.00 ymag: 1.00 xrot: 360.00 yrot: 360.00
GMOSAIC 
GMOSAIC Transforming image tmpimg4362_1711[VAR,3][1:1024,1:2304] to image tmpchipvar4362_1725
GMOSAIC     xshift: -1.84 yshift: -1.05 xmag: 1.00 ymag: 1.00 xrot: 360.00 yrot: 360.00
GMOSAIC 
GMOSAIC Transforming image tmpimg4362_1711[DQ,3][1:1024,1:2304] to image tmpdq_transimg4362_1659.fits
GMOSAIC     xshift: -1.84 yshift: -1.05 xmag: 1.00 ymag: 1.00 xrot: 360.00 yrot: 360.00
GMOSAIC imcopy  tmpchipsci4362_1718  mrgN20151214S0250.fits[1,append][1:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  tmpchipsci4362_1721  mrgN20151214S0250.fits[1,append][1043:2066,1:2304]  INDEF  0.
GMOSAIC imcopy  tmpchipsci4362_1724  mrgN20151214S0250.fits[1,append][2085:3108,1:2304]  INDEF  0.
GMOSAIC imcopy  tmpchipvar4362_1719  mrgN20151214S0250.fits[2,append][1:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  tmpchipvar4362_1722  mrgN20151214S0250.fits[2,append][1043:2066,1:2304]  INDEF  0.
GMOSAIC imcopy  tmpchipvar4362_1725  mrgN20151214S0250.fits[2,append][2085:3108,1:2304]  INDEF  0.
GMOSAIC imcopy  tmpchipdq4362_1720  mrgN20151214S0250.fits[3,append][1:1024,1:2304]  INDEF  0.
GMOSAIC imcopy  tmpchipdq4362_1723  mrgN20151214S0250.fits[3,append][1043:2066,1:2304]  INDEF  0.
GMOSAIC imcopy  tmpchipdq4362_1726  mrgN20151214S0250.fits[3,append][2085:3108,1:2304]  INDEF  0.
gmos$data/gmos-n_bpm_e2v_22_6amp_v1_mosaic.pl
GMOSAIC Cleaning areas outside imaging field, cleaning value = 1044.089
GMOSAIC All 4 images successfully mosaiced.
GMOSAIC --------------------
GMOSAIC Exit status: SUCCESS
GMOSAIC Log closed at [Sat 11:51:54 09-Apr-2016]
GMOSAIC -------------------------------------------------------------------
GMOSAIC 

Visually inspect the mosaiced frames


In [19]:
sciframes = open('sci.lis', 'r')
for line in sciframes:
    frame = line.strip()
    iraf.gdisplay('mrg'+frame, 1, z2=30000, fl_paste='yes')
sciframes.close()


GDISPLAY - Started: 2016-04-09T11:55:06

WARNING - GDISPLAY: only one science extension found, turning paste off

WARNING - GDISPLAY: Input image has been processed by GMOSAIC.
                    Switching off the following flags:
                          ret_roi=no

GDISPLAY: Displaying image...

GDISPLAY: Starting imexamine - quit with q

GDISPLAY - Finished: 2016-04-09T11:55:37


GDISPLAY - Started: 2016-04-09T11:55:37

WARNING - GDISPLAY: only one science extension found, turning paste off

WARNING - GDISPLAY: Input image has been processed by GMOSAIC.
                    Switching off the following flags:
                          ret_roi=no

GDISPLAY: Displaying image...

GDISPLAY: Starting imexamine - quit with q

GDISPLAY - Finished: 2016-04-09T11:55:39


GDISPLAY - Started: 2016-04-09T11:55:39

WARNING - GDISPLAY: only one science extension found, turning paste off

WARNING - GDISPLAY: Input image has been processed by GMOSAIC.
                    Switching off the following flags:
                          ret_roi=no

GDISPLAY: Displaying image...

GDISPLAY: Starting imexamine - quit with q

GDISPLAY - Finished: 2016-04-09T11:55:40


GDISPLAY - Started: 2016-04-09T11:55:40

WARNING - GDISPLAY: only one science extension found, turning paste off

WARNING - GDISPLAY: Input image has been processed by GMOSAIC.
                    Switching off the following flags:
                          ret_roi=no

GDISPLAY: Displaying image...

GDISPLAY: Starting imexamine - quit with q

GDISPLAY - Finished: 2016-04-09T11:55:42

STEP 9: Align and stack the mosaic target frames


In [20]:
iraf.imdelete(science['procsci'], verify='no')

iraf.imcoadd('mrg//@sci.lis', outimage=science['procsci'], logfile=logfile)


-----------------------------------------------------------------------------
IMCOADD -- Sat Apr  9 11:55:48 HST 2016

Images (and masks) in list
mrgN20151214S0247
mrgN20151214S0248
mrgN20151214S0249
mrgN20151214S0250
Alignment method: wcs
Making individual masks from DQ
Fixpix input images using DQ
Instrument + camera      : GMOS-N  
Telescope ISS port number: 5
Bad pixel file gmos$data/gmos-n_bpm_e2v_22_6amp_v1_mosaic.pl
Read noise:   3.20 e-   Gain:   1.00 e-/ADU
Co-added cleaned output image: ngc3310_g
Pixel scale: 0.1458
Statistics section: [100:3008,100:2204]
Finding objects in mrgN20151214S0247
Sampling for geotran  : 20  20
Block size for geotran: 2048  2048
Centering objects in mrgN20151214S0247
Number of objects successfully centered in reference image 621
Alignment method: wcs

Coordinate list: imxymatch.1  Transform: mrgN20151214S0248_trn
    Results file: 
Coordinate mapping status
    X fit ok.  Y fit ok.
    Xin and Yin fit rms: 0.002157217  0.001949573
Coordinate mapping parameters
    Mean Xref and Yref: 1554.5  1152.5
    Mean Xin and Yin: 1527.024  1111.345
    X and Y shift: -27.48818  -41.14324  (xin  yin)
    X and Y scale: 1.000001  1.000001  (xin / xref  yin / yref)
    X and Y axis rotation: 0.00048  0.00048  (degrees  degrees)
Centering objects in mrgN20151214S0248

Xmax =  3108   Ymax = 2304
Entering geomap
Fitting geometry rscale
Iterating a maximum of 5 times

Coordinate list: mrgN20151214S0248_trn  Transform: mrgN20151214S0248_trn
    Results file: tmpres4362_1764
Coordinate mapping status
    X fit ok.  Y fit ok.
    Xin and Yin fit rms: 13.92809  14.35318
Coordinate mapping parameters
    Mean Xref and Yref: 1648.737  1123.066
    Mean Xin and Yin: 1622.901  1080.271
    X and Y shift: -16.24183  -35.29944  (xin  yin)
    X and Y scale: 0.9942399  0.9942399  (xin / xref  yin / yref)
    X and Y axis rotation: 0.00817  0.00817  (degrees  degrees)

Coordinate list: mrgN20151214S0248_trn  Transform: mrgN20151214S0248_trn
    Results file: tmpres4362_1764
Coordinate mapping status
    X fit ok.  Y fit ok.
    Xin and Yin fit rms: 9.913597  9.795083
Coordinate mapping parameters
    Mean Xref and Yref: 1645.594  1106.737
    Mean Xin and Yin: 1619.871  1065.034
    X and Y shift: -20.92837  -39.46484  (xin  yin)
    X and Y scale: 0.997284  0.997284  (xin / xref  yin / yref)
    X and Y axis rotation: 359.96509  359.96509  (degrees  degrees)

Coordinate list: mrgN20151214S0248_trn  Transform: mrgN20151214S0248_trn
    Results file: tmpres4362_1764
Coordinate mapping status
    X fit ok.  Y fit ok.
    Xin and Yin fit rms: 6.112421  6.295635
Coordinate mapping parameters
    Mean Xref and Yref: 1649.107  1107.659
    Mean Xin and Yin: 1622.705  1067.045
    X and Y shift: -27.00471  -38.89734  (xin  yin)
    X and Y scale: 0.9993662  0.9993661  (xin / xref  yin / yref)
    X and Y axis rotation: 0.03043  0.03043  (degrees  degrees)

Coordinate list: mrgN20151214S0248_trn  Transform: mrgN20151214S0248_trn
    Results file: tmpres4362_1764
Coordinate mapping status
    X fit ok.  Y fit ok.
    Xin and Yin fit rms: 0.7649746  0.6940679
Coordinate mapping parameters
    Mean Xref and Yref: 1644.482  1125.196
    Mean Xin and Yin: 1616.73  1084.962
    X and Y shift: -27.2684  -40.51953  (xin  yin)
    X and Y scale: 0.9999796  0.9999796  (xin / xref  yin / yref)
    X and Y axis rotation: 359.99713  359.99713  (degrees  degrees)

Coordinate list: mrgN20151214S0248_trn  Transform: mrgN20151214S0248_trn
    Results file: tmpres4362_1764
Coordinate mapping status
    X fit ok.  Y fit ok.
    Xin and Yin fit rms: 0.1653911  0.1939947
Coordinate mapping parameters
    Mean Xref and Yref: 1642.009  1124.465
    Mean Xin and Yin: 1614.638  1084.069
    X and Y shift: -27.3173  -40.37244  (xin  yin)
    X and Y scale: 0.9999806  0.9999806  (xin / xref  yin / yref)
    X and Y axis rotation: 359.99911  359.99911  (degrees  degrees)

Coordinate list: imxymatch.1  Transform: mrgN20151214S0249_trn
    Results file: 
Coordinate mapping status
    X fit ok.  Y fit ok.
    Xin and Yin fit rms: 0.002017191  0.002053222
Coordinate mapping parameters
    Mean Xref and Yref: 1554.5  1152.5
    Mean Xin and Yin: 1609.386  1152.457
    X and Y shift: 54.90179  -0.06845017  (xin  yin)
    X and Y scale: 1.000001  1.000001  (xin / xref  yin / yref)
    X and Y axis rotation: 359.99911  359.99911  (degrees  degrees)
Centering objects in mrgN20151214S0249

Xmax =  3108   Ymax = 2304
Entering geomap
Fitting geometry rscale
Iterating a maximum of 5 times

Coordinate list: mrgN20151214S0249_trn  Transform: mrgN20151214S0249_trn
    Results file: tmpres4362_1764
Coordinate mapping status
    X fit ok.  Y fit ok.
    Xin and Yin fit rms: 14.03815  14.2177
Coordinate mapping parameters
    Mean Xref and Yref: 1648.312  1123.557
    Mean Xin and Yin: 1676.608  1079.364
    X and Y shift: 38.24583  -36.93018  (xin  yin)
    X and Y scale: 0.9944987  0.9944987  (xin / xref  yin / yref)
    X and Y axis rotation: 359.98373  359.98373  (degrees  degrees)

Coordinate list: mrgN20151214S0249_trn  Transform: mrgN20151214S0249_trn
    Results file: tmpres4362_1764
Coordinate mapping status
    X fit ok.  Y fit ok.
    Xin and Yin fit rms: 9.796052  9.618352
Coordinate mapping parameters
    Mean Xref and Yref: 1647.828  1112.1
    Mean Xin and Yin: 1676.592  1069.592
    X and Y shift: 34.31115  -40.25342  (xin  yin)
    X and Y scale: 0.9971096  0.9971096  (xin / xref  yin / yref)
    X and Y axis rotation: 359.95215  359.95215  (degrees  degrees)

Coordinate list: mrgN20151214S0249_trn  Transform: mrgN20151214S0249_trn
    Results file: tmpres4362_1764
Coordinate mapping status
    X fit ok.  Y fit ok.
    Xin and Yin fit rms: 5.934592  6.155616
Coordinate mapping parameters
    Mean Xref and Yref: 1650.613  1110.189
    Mean Xin and Yin: 1678.81  1068.865
    X and Y shift: 27.76185  -38.69568  (xin  yin)
    X and Y scale: 0.999183  0.9991831  (xin / xref  yin / yref)
    X and Y axis rotation: 0.04337  0.04337  (degrees  degrees)

Coordinate list: mrgN20151214S0249_trn  Transform: mrgN20151214S0249_trn
    Results file: tmpres4362_1764
Coordinate mapping status
    X fit ok.  Y fit ok.
    Xin and Yin fit rms: 0.7814917  0.8151023
Coordinate mapping parameters
    Mean Xref and Yref: 1647.261  1122.095
    Mean Xin and Yin: 1674.259  1081.145
    X and Y shift: 27.30696  -40.65588  (xin  yin)
    X and Y scale: 0.9999021  0.9999021  (xin / xref  yin / yref)
    X and Y axis rotation: 0.00679  0.00679  (degrees  degrees)

Coordinate list: mrgN20151214S0249_trn  Transform: mrgN20151214S0249_trn
    Results file: tmpres4362_1764
Coordinate mapping status
    X fit ok.  Y fit ok.
    Xin and Yin fit rms: 0.1730257  0.1535245
Coordinate mapping parameters
    Mean Xref and Yref: 1630.568  1117.241
    Mean Xin and Yin: 1657.834  1076.404
    X and Y shift: 27.32465  -40.87439  (xin  yin)
    X and Y scale: 0.9999876  0.9999876  (xin / xref  yin / yref)
    X and Y axis rotation: 359.99866  359.99866  (degrees  degrees)

Coordinate list: imxymatch.1  Transform: mrgN20151214S0250_trn
    Results file: 
Coordinate mapping status
    X fit ok.  Y fit ok.
    Xin and Yin fit rms: 0.001963524  0.001973575
Coordinate mapping parameters
    Mean Xref and Yref: 1554.5  1152.5
    Mean Xin and Yin: 1581.976  1193.655
    X and Y shift: 27.47833  41.14734  (xin  yin)
    X and Y scale: 1.000001  1.000001  (xin / xref  yin / yref)
    X and Y axis rotation: 359.99979  359.99979  (degrees  degrees)
Centering objects in mrgN20151214S0250

Xmax =  3108   Ymax = 2304
Entering geomap
Fitting geometry rscale
Iterating a maximum of 5 times

Coordinate list: mrgN20151214S0250_trn  Transform: mrgN20151214S0250_trn
    Results file: tmpres4362_1764
Coordinate mapping status
    X fit ok.  Y fit ok.
    Xin and Yin fit rms: 16.52842  15.62184
Coordinate mapping parameters
    Mean Xref and Yref: 1639.835  1112.084
    Mean Xin and Yin: 1696.292  1110.743
    X and Y shift: 69.44116  6.953369  (xin  yin)
    X and Y scale: 0.992881  0.992881  (xin / xref  yin / yref)
    X and Y axis rotation: 359.98636  359.98636  (degrees  degrees)

Coordinate list: mrgN20151214S0250_trn  Transform: mrgN20151214S0250_trn
    Results file: tmpres4362_1764
Coordinate mapping status
    X fit ok.  Y fit ok.
    Xin and Yin fit rms: 10.39527  9.971508
Coordinate mapping parameters
    Mean Xref and Yref: 1642.863  1096.373
    Mean Xin and Yin: 1700.002  1096.185
    X and Y shift: 62.11097  2.033569  (xin  yin)
    X and Y scale: 0.9971929  0.9971929  (xin / xref  yin / yref)
    X and Y axis rotation: 359.94714  359.94714  (degrees  degrees)

Coordinate list: mrgN20151214S0250_trn  Transform: mrgN20151214S0250_trn
    Results file: tmpres4362_1764
Coordinate mapping status
    X fit ok.  Y fit ok.
    Xin and Yin fit rms: 6.915654  6.700197
Coordinate mapping parameters
    Mean Xref and Yref: 1646.973  1095.126
    Mean Xin and Yin: 1702.874  1095.762
    X and Y shift: 56.12083  1.956665  (xin  yin)
    X and Y scale: 0.999219  0.999219  (xin / xref  yin / yref)
    X and Y axis rotation: 0.00050  0.00050  (degrees  degrees)

Coordinate list: mrgN20151214S0250_trn  Transform: mrgN20151214S0250_trn
    Results file: tmpres4362_1764
Coordinate mapping status
    X fit ok.  Y fit ok.
    Xin and Yin fit rms: 0.8771101  0.6838096
Coordinate mapping parameters
    Mean Xref and Yref: 1642.944  1110.819
    Mean Xin and Yin: 1697.158  1112.119
    X and Y shift: 55.07365  0.6619873  (xin  yin)
    X and Y scale: 1.000004  1.000004  (xin / xref  yin / yref)
    X and Y axis rotation: 359.99176  359.99176  (degrees  degrees)

Coordinate list: mrgN20151214S0250_trn  Transform: mrgN20151214S0250_trn
    Results file: tmpres4362_1764
Coordinate mapping status
    X fit ok.  Y fit ok.
    Xin and Yin fit rms: 0.2502319  0.2415513
Coordinate mapping parameters
    Mean Xref and Yref: 1625.052  1123.104
    Mean Xin and Yin: 1679.907  1123.948
    X and Y shift: 54.91368  0.7750244  (xin  yin)
    X and Y scale: 1.000004  1.000004  (xin / xref  yin / yref)
    X and Y axis rotation: 359.99741  359.99741  (degrees  degrees)

Median sky level for mrgN20151214S0247:    890.6
Transforming mrgN20151214S0248 to mrgN20151214S0248_trn

Transforming image mrgN20151214S0248[SCI] to image mrgN20151214S0248_trn
    Using transform mrgN20151214S0248_trn in database imcoadd.dat
Median sky level for mrgN20151214S0248:    886.2
Transforming mrgN20151214S0249 to mrgN20151214S0249_trn

Transforming image mrgN20151214S0249[SCI] to image mrgN20151214S0249_trn
    Using transform mrgN20151214S0249_trn in database imcoadd.dat
Median sky level for mrgN20151214S0249:    875.9
Transforming mrgN20151214S0250 to mrgN20151214S0250_trn

Transforming image mrgN20151214S0250[SCI] to image mrgN20151214S0250_trn
    Using transform mrgN20151214S0250_trn in database imcoadd.dat
Median sky level for mrgN20151214S0250:    881.0
Median sky level for mrgN20151214S0247:    890.6
Median sky level for mrgN20151214S0248:    886.2
Transforming mrgN20151214S0247badpix +mask to mrgN20151214S0248badpix

Transforming image tmpmsk4362_1758 to image mrgN20151214S0248badpix
    Using transform mrgN20151214S0248_trn in database imcoadd.dat
Median sky level for mrgN20151214S0249:    875.9
Transforming mrgN20151214S0247badpix +mask to mrgN20151214S0249badpix

Transforming image tmpmsk4362_1795 to image mrgN20151214S0249badpix
    Using transform mrgN20151214S0249_trn in database imcoadd.dat
Median sky level for mrgN20151214S0250:    881.0
Transforming mrgN20151214S0247badpix +mask to mrgN20151214S0250badpix

Transforming image tmpmsk4362_1799 to image mrgN20151214S0250badpix
    Using transform mrgN20151214S0250_trn in database imcoadd.dat

Mean intensity for   mrgN20151214S0247_trn:  (N,absolute,relative)=  176  1590830  1.000
Mean intensity for   mrgN20151214S0248_trn:  (N,absolute,relative)=  176  1592143  1.001
Mean intensity for   mrgN20151214S0249_trn:  (N,absolute,relative)=  176  1592876  1.001
Mean intensity for   mrgN20151214S0250_trn:  (N,absolute,relative)=  176  1586728  0.997

Masking cosmic ray events in mrgN20151214S0247_trn
Applying growth radius 1
Masking cosmic ray events in mrgN20151214S0248_trn
Applying growth radius 1
Masking cosmic ray events in mrgN20151214S0249_trn
Applying growth radius 1
Masking cosmic ray events in mrgN20151214S0250_trn
Applying growth radius 1
IMCOADD exit status: good
-----------------------------------------------------------------------------

STEP 10: Inspect and save product


In [28]:
iraf.display(science['procsci']+'[sci,1]', 1, \
             zrange='no', zscale='no', z1=500, z2=10000)

shutil.copy(science['procsci'], products_path)

# Final reduced image
os.listdir(products_path)


z1=500. z2=10000.
Out[28]:
['ngc3310_g.fits']

In [ ]: